DEV Community

Cover image for HTML Tags Developers Often Forget to Use
Iroh Omolola
Iroh Omolola

Posted on

HTML Tags Developers Often Forget to Use

Developers can occasionally overlook certain HTML tags, either due to habit or simply because some tags are less frequently needed. Here are a few HTML tags that senior developers might forget to use but can significantly enhance the structure, accessibility, and semantics of a webpage:

  1. <abbr> - Abbreviation Tag The tag is used to define abbreviations or acronyms. Browsers and screen readers can use this information to provide better user experiences.

<p>The <abbr title="World Health Organization">WHO</abbr> is headquartered in Geneva.</p>

  1. <cite> - Citation Tag The tag is used to denote the title of a work, such as a book, paper, or article. It adds semantic meaning and aids accessibility.

<p><cite>The Great Gatsby</cite> is a classic novel by F. Scott Fitzgerald.</p>

  1. <time> - Time Tag The

<p>We will meet at <time datetime="2024-07-19T15:30">3:30 PM on July 19, 2024</time>.</p>

  1. <figure> and
    <figcaption>
    tag provides a caption for the content.
    - Figure and Figure Caption Tags The tag specifies self-contained content, like illustrations, diagrams, or photos. The

<figure>
<img src="image.jpg" alt="A descriptive image">
<figcaption>This is a caption describing the image.</figcaption>
</figure>

  1. <details> and <summary> - Interactive Disclosure Tags The and tags are used to create interactive disclosure widgets that users can open and close. This is useful for FAQs or additional information sections.

<details>
<summary>More Information</summary>
<p>This is additional information that can be toggled by the user.</p>
</details>

  1. <mark> - Highlight Tag The tag highlights text, which can be useful for drawing attention to important information.

<p>Please read the <mark>important</mark> guidelines before proceeding.</p>

  1. <kbd> - Keyboard Input Tag The tag is used to denote user input via a keyboard, making it useful for documentation or tutorials.

<p>Press <kbd>Ctrl</kbd> + <kbd>S</kbd> to save your work.</p>

While these tags might not be used daily, incorporating them can improve the semantic structure, accessibility, and usability of web pages. Remembering to use these tags can help create more robust and user-friendly web applications.

Top comments (0)