HTML and CSS Reference
In-Depth Information
Figure 4-23. Deleted text is displayed with a strikethrough, and inserted text is underlined
Required Attributes
There are no attributes required for the del and ins elements.
Optional Attributes
cite : The URL of a document featuring information on why the change was made
datetime : The date and/or time the change to the document was made
As covered earlier in this chapter (see the time element), there are strict rules dictating
the format of machine-readable dates and times in a datetime attribute. You can find
Offset Text: i, b, u, and s
In the days of yore, before CSS was widely adopted, a number of elements existed in HTML strictly for
styling text: i for italic, b for bold, u for underline, and s for strikethrough. None of these elements carried
any additional meaning or imparted any real semantic value to their contents; they only affected visual
Yet they were still sometimes useful, even after CSS came to the fore and authors learned to eschew
presentational markup. Sometimes you really do just want to style some text in an italicized font without
adding any deeper emphasis. Sometimes bold text is only bold, not important. In a noble effort to avoid all
outdated, presentational markup, some authors resort to things like <span class="bold"> , which just
completely misses the point.
HTML5 has resurrected these presentational elements and imbued them with new meaning. They're still
essentially stylistic, but with their newfound sense of purpose they're no longer semantically worthless.
The i , b , u , and s elements now represent offset text ; a word or phrase that is different from the
surrounding text for a reason. Even so, you should only use these elements when they really are the most
appropriate for the content, and when a more meaningful element would add more meaning than you
The i element represents a word or phrase in an alternate voice, such as a few words in a foreign
language, a taxonomic or technical name, or a character's inner monologue. This text is typically styled in
an italic font, but doesn't warrant the greater stress or emphasis that the em element would apply.
<p>As the saying goes, <i lang="la">Quis custodiet ipsos custodes?</i> </p>
Search WWH ::

Custom Search