Question

There are some semantic markup tags that I rarely ever see used.

For instance,

<q>, <abbr>, <defn>, <ins>, <del>, and <s>.

Should such tags be used, and if so, in what context?

Was it helpful?

Solution

<q> tag

The HTML <q> tag is used for indicating short quotations (i.e. quotations that needs to display within a non-quoted paragraph). for long quotations use blockquote element.

Sample Code - q


<abbr> tag

The HTML <abbr> tag is used for indicating an abbreviation.

Sample Code - abbr


<dfn> tag

The HTML <dfn> tag is used for indicating a definition. The tag surrounds the word/term being defined.

Sample Code - dfn


<ins> tag

The HTML <ins> tag is used for markup of inserted text.

Sample Code - ins


<del> tag

The HTML <del> tag is used for markup of deleted text.

Sample Code - del


<s> tag

The HTML <s> tag is used for indicating text that is no longer accurate or no longer relevant. For example, it could be used to demonstrate a product that has had its price marked down, whilst still displaying the original price but with a line through the middle.

Sample Code - s

OTHER TIPS

From the HTML Documentation on elements:

  • The q element represents phrasing content quoted from another source.
  • The abbr element represents an abbreviation or acronym.
  • The dfn element represents the defining instance of a term.
  • The ins element represents a range of text that has been inserted (added) to a document.
  • The del element represents a range of text that has been deleted from a document.
  • The s element represents contents that are no longer accurate or no longer relevant and that therefore has been “struck” from the document.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top