What’s New in HTML 5: Semantics continued

Block-Level Semantics:

  • Dialog - The dialog, as the word implies, is used to represent reciprocal conversation between two or more persons. In HTML 5 three tags are used to represent the start and end of the entire dialog <dialog></dialog>, the speaker <dt></dt>, and the spoken part <dd></dd>.

Inline Semantics:

  • Mark - The mark element is represented by the m tag <m></m>. Marking an element lets it stand out, making it easy to find in a document. However, unlike boldfacing and italicizing a word it, marking a word(s) does not emphasize the word. Instead when you mark a word you simply sort of “highlight” it to give you a reference point pretty much the same way search terms appear when you view cahced pages on Google.
  • Time - The time element is simply used to denote a line of text as time and date. When using the time tag it is important to use the datetime attribute so that the line of text can be read and understood by browsers for what it is. This attribute will be useful in the future for applications like calendars and other stuff that will depend on dates and times. The correct syntax when using the timedateline attribute is as follows:

<p>My son was born
<time datetime=”2005-64-30T16:27:00-04:00″>4:27 P.M. on June 30th</time>.
</p>

With out the dateline attribute it can be coded as

<p>My son was born
<time>4:27 P.M. on June 30th</time>.
</p>

which is valid but will not be machine readable.

Source: New Elements in HTML 5 by Prof. E. Harold

Go back