MyInternships.in

HTML5

HTML5 – New Tags

HTML5 introduced many new elements to give pages clearer structure and native capabilities. These fall into groups: semantic/structural tags, media tags, graphics tags, and interactive/form tags. Below is a reference table followed by a runnable semantic-layout example.


New HTML5 Tags at a Glance

TagCategoryPurpose
<header>SemanticIntroductory content or a group of navigation links
<nav>SemanticA section of major navigation links
<main>SemanticThe dominant, unique content of the document
<section>SemanticA thematic grouping of content
<article>SemanticSelf-contained, independently distributable content
<aside>SemanticContent tangential to the main content (sidebars)
<footer>SemanticFooter for a section or page
<figure> / <figcaption>SemanticMedia with an associated caption
<audio> / <video>MediaEmbed sound and video natively
<source> / <track>MediaMedia alternatives and text tracks/subtitles
<canvas>GraphicsScriptable 2D drawing surface
<svg>GraphicsInline scalable vector graphics
<progress> / <meter>InteractiveTask progress and scalar gauge measurements
<details> / <summary>InteractiveNative expandable/collapsible disclosure widget
<datalist>FormPredefined autocomplete options for an input
<output>FormResult of a calculation or user action
<mark>TextHighlighted / marked reference text
<time>TextMachine-readable dates and times
<wbr>TextA suggested line-break opportunity

Runnable Semantic Layout Example

A full page built from HTML5 semantic tags
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Semantic HTML5 Layout</title>
  <style>
    body { font-family: sans-serif; margin: 0; }
    header, footer { background: #1a73e8; color: #fff; padding: 12px 16px; }
    nav a { color: #fff; margin-right: 12px; }
    main { display: flex; gap: 16px; padding: 16px; }
    article { flex: 2; }
    aside { flex: 1; background: #f1f3f4; padding: 12px; }
  </style>
</head>
<body>
  <header>
    <h1>My Blog</h1>
    <nav>
      <a href="#">Home</a>
      <a href="#">About</a>
      <a href="#">Contact</a>
    </nav>
  </header>
  <main>
    <article>
      <h2>Understanding HTML5</h2>
      <p>This article lives inside a semantic &lt;article&gt; element.</p>
    </article>
    <aside>
      <h3>Related</h3>
      <p>Sidebar content goes in &lt;aside&gt;.</p>
    </aside>
  </main>
  <footer>
    <p>&copy; 2026 My Blog</p>
  </footer>
</body>
</html>
ℹ️

Semantic tags do not change how content looks by default — they describe MEANING. This helps search engines, screen readers, and other developers understand your page structure.

Key Takeaways

  • HTML5 added semantic, media, graphics, and interactive tags.
  • Semantic tags like <header>, <nav>, <main>, and <footer> replace generic <div> soup.
  • Better structure improves accessibility and SEO.

Related HTML Topics

Keep learning with these closely related tutorials.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships