HTML Examples
Last Updated :
28 Feb, 2025
Improve
HTML (HyperText Markup Language) is the backbone of the web, providing the structural foundation for websites. Whether you're a beginner learning the basics or an experienced developer seeking quick references, examples are the most effective way to understand HTML concepts in action.
In this article, we’ve categorized all essential HTML concepts and provided practical examples for each, helping you grasp how these elements function in real-world scenarios.
Note: For Pratice you can use our GFG Online HTML Editor because it's simple and easy to use.
1. Basic HTML Tags and Structure
S.No | Topic Name |
---|---|
1 | HTML Document Structure |
2 | HTML Headings |
3 | HTML Paragraphs |
4 | HTML Links |
5 | HTML Images |
6 | HTML Buttons |
7 | HTML Lists |
2. HTML Attributes
S.No | Topic Name |
---|---|
1 | The title Attribute |
2 | The href Attribute |
3 | The width and height Attributes |
4 | The alt Attribute |
5 | Attribute Syntax and Usage |
3. HTML Text Formatting
4. HTML Lists and Tables
S.No | Topic Name |
---|---|
1 | Unordered Lists with Different Bullets |
2 | Ordered Lists with Different Markers |
3 | Description Lists |
4 | Nested Lists |
5 | Basic Tables |
6 | Table Borders and Collapsed Borders |
7 | Cell Padding and Spacing |
8 | Table Headings and Captions |
9 | Merging Cells |
10 | Styling Tables with id and class |
5. HTML Multimedia
S.No | Topic Name |
---|---|
1 | Embedding Videos |
2 | Embedding Audio |
3 | Using the <iframe> Element |
6. Styling with HTML and CSS
S.No | Topic Name |
---|---|
1 | Inline CSS |
2 | Internal CSS |
3 | External CSS |
4 | CSS Fonts |
5 | Styling with id and class Attributes |
6 | Borders, Padding, and Margin |
7. HTML Links
S.No | Topic Name |
---|---|
1 | Absolute URLs |
2 | Relative URLs |
3 | Changing Link Colors |
4 | Removing Underline from Links |
5 | Changing Link Targets |
6 | Images as Links |
7 | Bookmark Links |
8 | Mailto Links |
8. HTML Forms
S.No | Topic Name |
---|---|
1 | Form Structure and Elements |
2 | Input Types and Attributes |
3 | Form Validation |
4 | Grouping Form Data |
9. HTML Quotations and Citations
S.No | Topic Name |
---|---|
1 | Short Quotations with <q> |
2 | Block Quotations with <blockquote> |
3 | Author/Owner Information with <address> |
4 | Abbreviations and Acronyms with <abbr> |
5 | Work Title with <cite> |
6 | Text Direction with <bdo> |
10. HTML Comments
S.No | Topic Name |
---|---|
1 | Adding Comments in HTML |
2 | Conditional Comments |
3 | Comments for Debugging |
11. HTML Block and Inline Elements
S.No | Topic Name |
---|---|
1 | The <div> Element |
2 | The <span> Element |
3 | Styling <div> and <span> Elements |
12. Advanced Features
S.No | Topic Name |
---|---|
1 | HTML5 Semantic Elements |
2 | Graphics with <canvas> and SVG |
3 | Multimedia Elements in HTML5 |
4 | Forms Enhancements |