Basic HTML Structure
Basic HTML Structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basic HTML Page</title>
</head>
<body>
<h1>Welcome to HTML Lab</h1>
<p>This is a simple paragraph to understand the structure of an HTML page.</p>
</body>
</html>
2. HTML Forms
<!DOCTYPE html>
<html>
<head>
<title>HTML Form Example</title>
</head>
<body>
<h2>Registration Form</h2>
<form action="#" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password"><br><br>
3. HTML Tables
<!DOCTYPE html>
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<h2>Student Information</h2>
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
<th>Course</th>
</tr>
<tr>
<td>Alice</td>
<td>21</td>
<td>Computer Science</td>
</tr>
<tr>
<td>Bob</td>
<td>22</td>
<td>Information Technology</td>
</tr>
</table>
</body>
</html>
4. HTML Lists
<!DOCTYPE html>
<html>
<head>
<title>HTML Lists</title>
</head>
<body>
<h2>Ordered List</h2>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ol>
<h2>Unordered List</h2>
<ul>
<li>Python</li>
<li>Java</li>
<li>C++</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Form Elements</title>
</head>
<body>
<h2>Survey Form</h2>
<form>
<label>Gender:</label><br>
<input type="radio" name="gender" value="male"> Male
<input type="radio" name="gender" value="female"> Female<br><br>
<label>Choose a Country:</label>
<select>
<option value="usa">USA</option>
<option value="uk">UK</option>
<option value="india">India</option>
</select><br><br>
<!DOCTYPE html>
<html>
<head>
<title>Images and Links</title>
</head>
<body>
<h2>Image Example</h2>
<img src="https://via.placeholder.com/150" alt="Sample Image"><br><br>
<h2>Link Example</h2>
<a href="https://www.google.com" target="_blank">Visit Google</a>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Audio & Video</title>
</head>
<body>
<h2>Audio Example</h2>
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<h2>Video Example</h2>
<video width="320" height="240" controls>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>