DEV Community

Cover image for HTML5 All Tags
Saman Mahmood
Saman Mahmood

Posted on

HTML5 All Tags

HTML5 introduced several new tags and attributes to enhance the structure, semantics, and functionality of web documents.

  1. <!DOCTYPE html>: This declaration specifies the document type and version as HTML5.

  2. <html>: The root element that wraps all the content on the page.

  3. <head>: Contains meta-information about the document, such as the title, character encoding, and linked resources like stylesheets and scripts.

  4. <title>: Sets the title of the web page, which is displayed in the browser's title bar or tab.

  5. <meta>: Provides metadata about the document, such as character encoding and viewport settings.

  6. <link>: Used to link external resources like stylesheets.

  7. <style>: Embeds CSS for styling the document.

  8. <script>: Embeds JavaScript code or links to external scripts.

  9. <body>: Contains the main content of the web page.

  10. <header>: Represents introductory content for a section or page, typically containing headings and navigation elements.

  11. <nav>: Defines a navigation menu or links within the document.

  12. <main>: Represents the main content of the document, excluding headers and footers.

  13. <section>: Defines a thematic grouping of content within the document.

  14. <article>: Represents a self-contained piece of content, like a blog post or news article.

  15. <aside>: Contains content that is tangentially related to the content around it, like a sidebar.

  16. <footer>: Contains the footer information of a section or page, typically copyright notices and contact information.

  17. <h1>, <h2>, <h3>, <h4>, <h5>, <h6>: Heading elements for creating section headings, with <h1> being the highest level and <h6> the lowest.

  18. <p>: Defines a paragraph.

  19. <br>: Represents a line break within text.

  20. <hr>: Creates a thematic break or horizontal rule.

  21. <a>: Defines hyperlinks.

  22. <ul>: Creates an unordered (bulleted) list.

  23. <ol>: Creates an ordered (numbered) list.

  24. <li>: Defines list items within <ul> or <ol>.

  25. <div>: A generic container for grouping and styling content.

  26. <span>: A generic inline container for styling content.

  27. <img>: Embeds images.

  28. <video>: Embeds video content.

  29. <audio>: Embeds audio content.

  30. <canvas>: Used for dynamic, scriptable rendering of 2D graphics.

  31. <form>: Defines an HTML form for user input.

  32. <input>: Creates form input elements.

  33. <textarea>: Creates a multiline text input field within a form.

  34. <label>: Provides a label for a form element.

  35. <button>: Creates a clickable button within a form.

  36. <select>: Creates a dropdown list within a form.

  37. <option>: Defines options within a <select> element.

  38. <iframe>: Embeds an inline frame for displaying another web page within the current document.

  39. <details>: Defines additional details that can be toggled open and closed.

  40. <summary>: Provides a summary or caption for a <details> element.

These are some of the most commonly used HTML5 tags. HTML5 introduced several other tags and attributes to enhance web development, but these cover the essentials for creating structured and semantically meaningful web pages.

Top comments (0)