- Home
- /
- Tutorials
- /
- HTML Tutorial
- /
- HTML5 New Tags
HTML References
HTML5 New Tags
HTML5 added tags that say what content is, instead of everything being a div: header, nav, article, footer for structure, video and audio for media, and new form tools like datalist. This page is a map of them, with a link to each one's full lesson.
Why HTML5 Introduced New Tags
Before HTML5, a page was a pile of <div> elements with class names like header and menu. The new tags carry that meaning themselves, so browsers, screen readers and search engines understand the page without guessing.
Example:
html
<header>
<h1>Welcome to HTML5</h1>
</header>
<article>
<h2>HTML5 Features</h2>
<p>HTML5 brings new structure and multimedia tags for modern web development.</p>
</article>
<footer>
<p>© 2025 HTML5 & CSS3</p>
</footer>The page looks the same as with divs, but each part now says what it is.
Structural & Semantic Tags
| Tag | Description |
|---|---|
<header> | Defines the top section of a webpage or a document section. |
<footer> | Defines the footer section (bottom area). |
<nav> | Represents a navigation menu or group of links. |
<article> | Defines self-contained, independent content (e.g., news, blog posts). |
<section> | Represents a thematic grouping of content. |
<aside> | Defines content indirectly related to the main content (e.g., sidebar). |
<main> | Specifies the main or central content of a document. |
<figure> | Groups images, diagrams, or illustrations with captions. |
<figcaption> | Defines a caption for the <figure> element. |
<mark> | Highlights text. |
<time> | Represents time, date, or both. |
Full details are in Semantic Layout Tags.
Multimedia Tags
| Tag | Description |
|---|---|
<audio> | Used to embed audio files. |
<video> | Used to embed videos. |
<source> | Defines multiple media sources for <audio> or <video>. |
<track> | Provides captions or subtitles for videos. |
<canvas> | Used for drawing graphics using JavaScript. |
<svg> | Defines scalable vector graphics. |
<embed> | Embeds external content like plugins or media. |
Example:
html
<video controls width="320">
<source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>The video plays with the browser's own controls, no plugin needed. See HTML Video.
Form-Related New Tags
| Tag | Description |
|---|---|
<datalist> | Defines a list of pre-defined options for an input field. |
<output> | Represents the result of a calculation or action. |
<progress> | Shows the completion progress of a task. |
<meter> | Displays a scalar measurement (e.g., temperature, rating). |
<keygen> | (Deprecated) Used for generating encryption keys. |
Example:
html
<label for="browser">Choose your browser:</label>
<input list="browsers" id="browser" name="browser">
<datalist id="browsers">
<option value="Chrome">
<option value="Firefox">
<option value="Safari">
</datalist>Typing into the field shows the browser names as suggestions, while still allowing any other value.
Interactive & Scripting Tags
| Tag | Description |
|---|---|
<details> | Creates a collapsible content section. |
<summary> | Defines a visible heading for the <details> element. |
<dialog> | Represents a dialog box or popup. |
<menu> | Defines a list or menu of commands. |
<menuitem> | Represents a command in a popup menu (deprecated in HTML5.2). |
Example:
html
<details>
<summary>Show Details</summary>
<p>This is additional information that can be toggled open or closed.</p>
</details>Click "Show Details" to open the hidden text, with no JavaScript.
Other Useful Additions
| Tag | Description |
|---|---|
<wbr> | Suggests a possible line break. |
<bdi> | Isolates text for bidirectional formatting. |
<bdo> | Overrides current text direction. |
<ruby>, <rt>, <rp> | Used for annotations in East Asian typography. |
Example:
html
<p>My name is <bdi>علي</bdi>.</p>The Arabic name is isolated, so it cannot jumble the English text around it.
Complete Example of HTML5 New Tags
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML5 New Tags Example</title>
</head>
<body>
<header>
<h1>HTML5 Semantic Example</h1>
<nav>
<a href="#home">Home</a> |
<a href="#articles">Articles</a>
</nav>
</header>
<main>
<article id="articles">
<header>
<h2>Understanding HTML5 Tags</h2>
</header>
<p>HTML5 introduced many new elements that improve the structure of web documents.</p>
<figure>
<img src="/assets/images//assets/images/html5_and_css3_logo.png" alt="HTML5 Logo" width="150">
<figcaption>HTML5 Logo</figcaption>
</figure>
</article>
<aside>
<h3>Did You Know?</h3>
<p>You can use the <mark><mark></mark> tag to highlight important text!</p>
</aside>
</main>
<footer>
<p>© 2025 HTML5 & CSS3 Tutorials</p>
<time datetime="2025-10-22">October 22, 2025</time>
</footer>
</body>
</html>Browser Support
Chrome | Edge | Firefox | Safari | Opera | IE9+ |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
Good to know
- All of these work in every current browser. You do not need any polyfill or script for them any more.
- New tags only help when they are used for what they mean. A
<section>used as a styling box is no better than a<div>. - HTML keeps evolving after HTML5: newer additions like
<search>and<dialog>follow the same idea.
HTML5 New Tags exercises
Three areas
Write a header that says My Site, a main that says News and a footer that says Contact, in this order.
Result
