HTML has a variety of tags that are very useful for better website development or developing experience.
I have created 10 less-used HTML tags that can improve our HTML code and make it more professional.
-
<details>
: Used to create a disclosure widget to show/hide additional information.
<details>
<summary>Click to reveal more</summary>
<p>Additional information goes here.</p>
</details>
-
<time>
: Represents a specific period in time or date.
<p>Meeting scheduled for <time datetime="2024-02-14">today</time>.</p>
-
<abbr>
: Defines an abbreviation or acronym.
<p>The <abbr title="World Health Organization">WHO</abbr> is leading the fight against COVID-19.</p>
-
<progress>
: Displays the progress of a task or process.
<progress value="70" max="100">70%</progress>
-
<mark>
: Highlights text within a document.
<p>Search results: <mark>HTML</mark> and <mark>CSS</mark>.</p>
-
<cite>
: Specifies the title of a creative work, like a book or a movie.
<p><cite>The Great Gatsby</cite> by F. Scott Fitzgerald</p>
-
<samp>
: Represents sample output from a program or computing system.
<p>User input: <samp>ls -l</samp></p>
-
<kbd>
: Indicates keyboard input.
<p>To save, press <kbd>Ctrl + S</kbd>.</p>
-
<wbr>
: Represents a word break opportunity within the text.
<p>LongWordWithNoSpaces<wbr>BrokenHere</p>
-
<figure>
and<figcaption>
: Used together to encapsulate media content (like images) with a caption.
<figure>
<img src="image.jpg" alt="Description">
<figcaption>Caption describing the image</figcaption>
</figure>
Top comments (0)