HTML Project File: 20 Programs with Output
1. Basic HTML Page
<!DOCTYPE html>
<html>
<head><title>My First Page</title></head>
<body>
<h1>Hello, World!</h1>
<p>This is my first HTML page.</p>
</body>
</html>
Output:
Hello, World!
This is my first HTML page.
2. HTML Headings
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
</body>
</html>
Output:
Heading 1
Heading 2
Heading 3
3. Paragraph and Line Breaks
<!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.<br>This is a new line.</p>
</body>
</html>
Output:
This is a paragraph.
This is a new line.
4. Bold, Italic, Underline
<!DOCTYPE html>
<html>
<body>
<b>Bold Text</b><br>
<i>Italic Text</i><br>
<u>Underlined Text</u>
</body>
</html>
Output:
Bold Text
Italic Text
Underlined Text
5. Unordered List
<!DOCTYPE html>
<html>
<body>
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Mango</li>
</ul>
</body>
</html>
Output:
- Apple
- Banana
- Mango
6. Ordered List
<!DOCTYPE html>
<html>
<body>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ol>
</body>
</html>
Output:
1. HTML
2. CSS
3. JavaScript
7. HTML Links
<!DOCTYPE html>
<html>
<body>
<a href="https://www.google.com">Visit Google</a>
</body>
</html>
Output:
Visit Google (clickable link)
8. HTML Images
<!DOCTYPE html>
<html>
<body>
<img src="https://via.placeholder.com/150" alt="Placeholder Image">
</body>
</html>
Output:
Image with 150x150 pixels (Placeholder)
9. HTML Table
<!DOCTYPE html>
<html>
<body>
<table border="1">
<tr><th>Name</th><th>Age</th></tr>
<tr><td>John</td><td>25</td></tr>
<tr><td>Jane</td><td>23</td></tr>
</table>
</body>
</html>
Output:
Table: Name | Age
John | 25
Jane | 23
10. HTML Form
<!DOCTYPE html>
<html>
<body>
<form>
Name: <input type="text" name="name"><br>
Age: <input type="number" name="age"><br>
<input type="submit">
</form>
</body>
</html>
Output:
Form with text input for Name, number input for Age, and a submit button