Black Friday: Enjoy a 35% discount on the bundles. Apply the code BLACKFRIDAY35 ( uppercase ) at checkout! Limited offer.

← Back to all tutorials

Exploring the Hidden Gems: Uncommon Semantic HTML Tags

Published and written on Jan 21 2024 by Michael Andreuzza

Introduction

Semantic HTML plays a crucial role in web development, improving accessibility and making web pages more readable for both users and search engines. While some tags like <header>, <footer>, and <article> are widely recognized, there are several lesser-known tags that deserve the spotlight for the functionality and structure they can bring to your web projects.

The Most Uncommon Semantic HTML Tags

<details> and <summary>

Provides an interactive widget that users can open and close to reveal or hide additional information.

<details>
  <summary>More about semantic HTML</summary>
  <p>Semantic HTML tags provide information about the contents of those tags that goes beyond just how they look on a page.</p>
</details>

<mark>

Used to highlight parts of text, indicating a relevance to the user’s current activity.

<p>Don't forget to use the <mark>semantic tags</mark> in your HTML documents.</p>

<time>

Represents a specific period in time or a duration, enhancing the machine-readability of dates and times.

<time datetime="2023-01-21">January 21, 2023</time>

<data>

Associates a machine-readable equivalent with its content, useful for embedding data values in a human-readable format.

<ul>
  <li>Item: Vacuum Cleaner <data value="59.99">($59.99)</data></li>
</ul>

<output>

Used to represent the result of a calculation or user action.

<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
  <input type="number" id="a" name="a" value="2"> +
  <input type="number" id="b" name="b" value="3"> =
  <output name="result" for="a b">5</output>
</form>

Why These Tags Matter

In this section, discuss the importance of using semantic tags for accessibility, SEO, and maintaining a clean document structure. Highlight how uncommon tags can add value and functionality to web content beyond the visual presentation.

Conclusion

While they might be less frequently used, these uncommon semantic HTML tags offer unique benefits that can significantly impact the accessibility and effectiveness of your website. Incorporating them into your web projects can enhance user experience and improve search engine visibility.

Further Reading

  • HTML5 Semantic Elements - Explore the full range of HTML5 semantic elements with this comprehensive guide from MDN Web Docs. Learn how to use each tag and see examples of their practical applications.
  • Using HTML sections and outlines - Dive deeper into structuring HTML documents effectively with this detailed article from the W3C. It covers the importance of using semantic sections and outlines to improve accessibility and SEO.

/Michael Andreuzza

Did you like this tutorial? Please share it with your friends!