HTML Examples

One giant HTML file containing lots of examples

1. Basic HTML

This entire webpage is an HTML document.

HTML stands for HyperText Markup Language.

2. Headings

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

3. Text Formatting

This is a normal paragraph.

Bold text

Italic text

Underlined text

Highlighted text

Small text

Deleted text

Inserted text

Water: H2O

Mathematics: x2

This is
a line break.


Text after a horizontal line.

5. Images

Example image:

Placeholder image

Images can have alt text, dimensions, borders, links, and more.

6. Lists

Unordered List

Ordered List

  1. Turn on computer
  2. Open browser
  3. Visit website

Nested List

7. Buttons

This message can be changed.

8. Forms







9. Input Types

10. Text Area

11. Dropdown Menu

12. Table

Name Age Operating System
Alice 25 Linux
Bob 30 Windows
Charlie 22 macOS

13. Cards

My Computer

Ryzen 5 CPU

8 GB RAM

512 GB SSD

Another Computer

Intel CPU

16 GB RAM

1 TB SSD

14. Semantic HTML

Example Article

This demonstrates semantic elements such as article, header, section, and footer.

Article footer

15. Expandable Content

Click to expand

This content was hidden until you clicked the summary.

16. Video

17. Audio

18. IFrame

19. Progress Bar

70%

70% complete

20. Code

#include <stdio.h>

int main() {
    printf("Hello, world!");
    return 0;
}

21. Image Gallery

22. Login Form





23. JavaScript Examples

Click the button.

No number yet.

👋 Hello! You can hide me.

24. Mini Website Example

My Website

Welcome!

My Projects

Project One

This is my first project.

Project Two

This is my second project.

Mini website footer

25. More HTML Elements

HTML

This is a block quotation.
This is an inline quotation.

Keyboard: Ctrl + C

Variable: x

Output: Hello World

Example address
Example City

🎉 That's a LOT of HTML!

All of these examples are contained inside this one HTML file.