HTML Assignment 1: Basic Structure and Tags
Assignment:
Create an HTML page that includes the following:
1. A title.
2. A heading.
3. A paragraph with some text.
4. An image (use any image link).
5. An unordered list of 3 hobbies.
6. A link to your favorite website.
7. A table with 2 rows and 2 columns.
8. A form with input fields: name, email, and a submit button.
Answer (HTML Code):
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to My Page</h1>
<p>This is a paragraph with some text about myself.</p>
<img src="https://via.placeholder.com/150" alt="Placeholder Image">
<ul>
<li>Reading</li>
<li>Coding</li>
<li>Gaming</li>
</ul>
<a href="https://www.example.com">Visit my favorite site</a>
<table border="1">
<tr>
<td>Row 1, Col 1</td>
<td>Row 1, Col 2</td>
</tr>
<tr>
<td>Row 2, Col 1</td>
<td>Row 2, Col 2</td>
</tr>
</table>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>