
This HTML tutorial will provide you with a simple roadmap to learn Hyper Text Markup Language (HTML). HTML markup language is used in almost all major websites coded by developers. If you want to learn how to build web pages, then it is important for you to start with HTML first.
In this HTML tutorial, we will learn how to use HTML tags and attributes to create web pages. We will start with the fundamentals of web development: HTML basic tags, formatting tags, classes, layout and more. We will then also know what to learn next in web development. After reading this tutorial you will build a strong foundation in HTML.
HTML lays the foundation of web development as it integrates different frameworks and tools for web pages. Every front end and backend framework uses HTML to integrate their features into the web pages.
| <!DOCTYPE html> <html> <head> <title> HTML Tutorial </title> </head> <body> <h2> Hello World Example </h2> <p> Hello World! </p> </body> </html> |
| Category | Tag | Description |
| Document Structure | <!DOCTYPE html> | Defines the document type and HTML version. |
| <html> | Root element of an HTML document. | |
| <head> | Container for metadata and external resources. | |
| <title> | Sets the webpage title displayed in the browser tab. | |
| <body> | Main content of the webpage. | |
| Text Formatting | <h1> to <h6> | Headings (h1 is the largest, h6 is the smallest). |
| <p> | Paragraph. | |
| <br> | Line break. | |
| <hr> | Horizontal rule (divider line). | |
| <strong> | Bold text (important, semantically). | |
| <em> | Italic text (important, semantically). | |
| <b> | Bold text (stylistic purposes). | |
| <i> | Italic text (stylistic purposes). | |
| <u> | Underlined text. | |
| <small> | Smaller text. | |
| <mark> | Highlighted text. | |
| Grouping | <div> | Block-level container for organizing elements. |
| <span> | Inline container for text or inline elements. | |
| List | <ul> | Unordered list (bullet points). |
| <ol> | Ordered list (numbered). | |
| <li> | List item, used inside <ul> or <ol>. | |
| Link & Navigation | <a> | Anchor tag, used to create links. |
| <nav> | Section for navigation links. | |
| Image & Media | <img> | Embeds an image. |
| <audio> | Embeds audio content. | |
| <video> | Embeds video content. | |
| <source> | Defines media resources for <audio> or <video>. | |
| <figure> | Self-contained content, like images or diagrams. | |
| <figcaption> | Caption for <figure> content. | |
| Table | <table> | Table element. |
| <tr> | Table row. | |
| <td> | Table cell. | |
| <th> | Table header cell. | |
| <thead> | Table header section. | |
| <tbody> | Table body section. | |
| <tfoot> | Table footer section. | |
| HTML Form | <form> | Container for form elements. |
| <input> | Input field for user data. | |
| <textarea> | Multi-line text input field. | |
| <button> | Button element. | |
| <select> | Dropdown list. | |
| <option> | Option in a dropdown list. | |
| <label> | Label for form elements. | |
| <fieldset> | Grouping for related form elements. | |
| <legend> | Title for a <fieldset> group. | |
| Semantic & Layout | <header> | Header section for introductory content. |
| <footer> | Footer section for concluding content. | |
| <section> | Defines a section in a document. | |
| <article> | Self-contained content (like a blog post). | |
| <aside> | Sidebar content, related but secondary. | |
| <main> | Main content of the document. | |
| <figure> | Groups media content with <figcaption>. | |
| Metadata & Scripting | <meta> | Provides metadata (e.g., charset, viewport). |
| <link> | Links to external resources like CSS files. | |
| <style> | Embeds CSS styles within HTML | |
| <script> | Embeds JavaScript code. |
The HTML references also define the page layout with all tags arranged as metadata, flow content, sectioning element, heading element, embedded element, scripted element, etc.
| Metadata elements |
|
| Flow Content |
|
| Sectioning Content |
|
| Heading Content |
|
| Phrasing Content |
|
| Embedded Content |
|
| Interactive Content |
|
| Form associated content |
|
| Tag | Description |
| <table> | Defines a table structure for organizing data in rows/columns. |
| <tr> | Table row, used within <table> to create rows of data. |
| <td> | Table cell, used within <tr> to contain individual data items. |
| <th> | Table header cell, often used for headings in tables. Appears bold and centered by default. |
| <caption> | Adds a title or caption to the table, usually displayed above the table. |
| <ol> <li>First item</li> <li>Second item</li> <li>Third item</li> </ol> |
| <ul> <li>Item A</li> <li>Item B</li> <li>Item C</li> </ul> |
| <dl> <dt>HTML</dt> <dd>A standard markup language for creating web pages.</dd> <dt>CSS</dt> <dd>A style sheet language used for describing the look and formatting of a document.</dd> </dl> |
| Tag | Description |
| <form> | Wraps form elements for collecting user input. |
| <input> | Allows user input in various types (text, password, radio, checkbox, etc.). |
| <label> | Labels an input field to improve accessibility and usability. |
| <textarea> | Creates a multi-line text input field for larger text input. |
| <select> | Dropdown menu for user selection, containing multiple <option> elements. |
| <option> | Defines each option within a <select> dropdown. |
| <button> | Creates a clickable button, often used to submit the form. |
| <fieldset> | Groups related elements in a form, often with a border around them. |
| <legend> | Provides a caption for a <fieldset>, describing the grouped form elements. |
| HTML Formatting Tags | Description |
| <b> | It makes the text more bold and readable |
| <strong> | It also makes the text bold with a semantic value. |
| <i> | It is used to make the text content italic |
| <em> | It makes the content italic and conveys a semantic value to the enclosed text |
| <u> | It is used to underline the text or sentence. |
| <strike> | It is used to pass a strikethrough the text |
| <mark> | It is used to highlight a part of text or sentence with noticeable colors. |
| <sup> | It is used to add superscript to the element |
| <sub> | It is used to add subscript to the element |
| <del> | It is used to delete a part of the text content |
The HTML advanced concepts takes you one step ahead in web development. It helps you master the HTML fundamentals, tags, and explore more advanced concepts of HTML to build dynamic and responsive websites. Check some of the advanced concepts to learn in HTML.
In web development, HTML marks the stepping stone for creating beautiful, interactive and user-friendly web applications. There are many benefits of learning HTML for web development.