HTML Practice Assignment Marqee
- Get link
- X
- Other Apps
1. Basic Marquee
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basic Marquee</title>
</head>
<body>
<h2>Welcome to My Website</h2>
<marquee>Welcome! Stay tuned for updates.</marquee>
</body>
</html>
2. Marquee with a Table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marquee with Table</title>
</head>
<body>
<marquee>Latest Scores: Team A - 2, Team B - 3</marquee>
<table border="1">
<tr>
<th>Team</th>
<th>Score</th>
</tr>
<tr>
<td>Team A</td>
<td>2</td>
</tr>
<tr>
<td>Team B</td>
<td>3</td>
</tr>
</table>
</body>
</html>
3. Marquee with Unordered List
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marquee with List</title>
</head>
<body>
<marquee direction="left" behavior="alternate">Breaking News: Stay Safe!</marquee>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</body>
</html>
4. Table with Marquee Header
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table with Marquee Header</title>
</head>
<body>
<marquee scrollamount="5">Welcome to the Product List</marquee>
<table border="1">
<tr>
<th>Product</th>
<th>Price</th>
</tr>
<tr>
<td>Laptop</td>
<td>$1000</td>
</tr>
<tr>
<td>Phone</td>
<td>$800</td>
</tr>
</table>
</body>
</html>
5. Marquee with Nested Lists
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marquee with Nested Lists</title>
</head>
<body>
<marquee direction="up" height="50">Upcoming Events</marquee>
<ul>
<li>Event A
<ul>
<li>Details A1</li>
<li>Details A2</li>
</ul>
</li>
<li>Event B
<ul>
<li>Details B1</li>
<li>Details B2</li>
</ul>
</li>
</ul>
</body>
</html>
6. Horizontal Marquee with Table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Horizontal Marquee with Table</title>
</head>
<body>
<marquee direction="right">Scrolling to the right!</marquee>
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
<tr>
<td>Jane</td>
<td>22</td>
</tr>
</table>
</body>
</html>
7. Stylized Marquee with Ordered List
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stylized Marquee</title>
<style>
marquee {
color: red;
font-size: 20px;
}
</style>
</head>
<body>
<marquee>Important Announcement</marquee>
<ol>
<li>First Point</li>
<li>Second Point</li>
<li>Third Point</li>
</ol>
</body>
</html>
8. Marquee with Highlighted Table Rows
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marquee with Table Rows</title>
<style>
tr:nth-child(odd) {
background-color: lightgray;
}
</style>
</head>
<body>
<marquee direction="up" height="50">Daily Updates</marquee>
<table border="1">
<tr>
<th>Task</th>
<th>Status</th>
</tr>
<tr>
<td>Task 1</td>
<td>Completed</td>
</tr>
<tr>
<td>Task 2</td>
<td>Pending</td>
</tr>
</table>
</body>
</html>
9. Marquee with Custom List
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marquee with Custom List</title>
<style>
ul {
list-style-type: square;
}
</style>
</head>
<body>
<marquee behavior="alternate" bgcolor="lightblue">Welcome to the Portal</marquee>
<ul>
<li>Custom Item 1</li>
<li>Custom Item 2</li>
</ul>
</body>
</html>
10. Complete Combination
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Complete Example</title>
<style>
table {
width: 50%;
border-collapse: collapse;
}
th, td {
border: 1px solid black;
text-align: center;
padding: 8px;
}
</style>
</head>
<body>
<marquee direction="left">Complete Example: Marquee, Table, and List</marquee>
<table>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
<tr>
<td>Alice</td>
<td>Manager</td>
</tr>
<tr>
<td>Bob</td>
<td>Developer</td>
</tr>
</table>
<ul>
<li>Task 1</li>
<li>Task 2</li>
<li>Task 3</li>
</ul>
</body>
</html>
- Get link
- X
- Other Apps
Comments
Post a Comment