HTML dfn and abbr tags and proper use of title attribute

I am trying to figure out what is the correct way to use a tag dfnwith an attribute titleand a tag abbr. I am not sure if I am doing it right and hoped if someone could tell me if any, if not all of my examples below are right or wrong, if so, which example is wrong and why I can do better understand what I'm doing and fix my mistakes Thank you?

Example 1

<p><dfn>CSS</dfn> is a simple mechanism for adding style to Web documents.</p>

Example 2

<p><dfn title="Cascading Style Sheets">CSS</dfn> is a simple mechanism for adding style to Web documents.</p>

Example 3

<p><dfn title="A style sheet language used for describing the look and formatting of a document written in a markup language.">CSS</dfn> is a simple mechanism for adding style to Web documents.</p>

Example 4

<p><dfn><abbr title="Cascading Style Sheets">CSS</abbr></dfn> is a simple mechanism for adding style to Web documents.</p>

Example 5

<p><dfn title="CSS"><abbr title="Cascading Style Sheets">CSS</abbr></dfn> is a simple mechanism for adding style to Web documents.</p>
+4
source share
2 answers

I think it should be:

<p>
  <dfn>
    <abbr title="Cascading Style Sheets">CSS</abbr>
  </dfn>
  is a simple mechanism for adding style to Web documents.
</p>

, abbr title, .

MDN

+3

"" abbr dfn HTML. ( - CSS, , , , , "CSS" , , , "" .

, abbr dfn , , CSS, , span.

+1

Source: https://habr.com/ru/post/1526204/


All Articles