It's Christmas, get a 30% OFF. Apply code XMAS at checkout.
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.
<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>
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.
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.
/Michael Andreuzza