Search code examples
htmlsemanticsmarkup

What is the proper use of the tags <q>, <abbr>, <defn>, <ins>, <del>, and <s>?


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?


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