Skip to the content.

10 Rare HTML Tags That Nobody Ever Uses

There’s way more to HTML than <div>, <a>, and <p>. Many sophisticated and powerful tags often go unnoticed.

1. The <abbr> tag

Defines an abbreviation or acronym, like HTML, CSS, and JS.

Hover over <abbr> to show the full form:

abbr example

2. The <q> tag

Indicates a short inline quotation. Modern browsers typically wrap the enclosed text in quotation marks.

q example

3. The <s> tag

Strikes through text to correct without destroying the change history. Similar to <del> and <ins>, which are meant for document updates.

s example

4. The <mark> tag

Marks or highlights text with a yellow background color by default, similar to how browsers show search results.

mark example

5. The <wbr> tag

Indicates where the browser can break text. Without <wbr>:

without wbr

With <wbr>:

with wbr

6. The <details> tag

Allows content to be expanded and contracted.

Contracted:

details contracted

Expanded:

details expanded

7. The <optgroup> tag

Groups options within a <select> element, useful for organizing large option lists.

optgroup example

8. The <datalist> tag

Creates a dropdown list for autocomplete within an <input> element.

datalist example

9. The <fieldset> tag

Creates a set of related form fields with a visual separation. The <legend> tag defines a caption for the <fieldset>.

fieldset example

10. The <sup> and <sub> tags

<sup> for superscript and <sub> for subscript, useful for scientific notations.

sup and sub example

Ref: Tari Ibaba - Medium