HTML and CSS Reference
The first is chemical equation for water—two hydrogen atoms and one oxygen
atom—and the second is simply the letter H followed by the number 2 and then the letter
O and is meaningless. So, the placing and styling of the 2 is therefore important, and
if you removed its styling and positioning and placed it in a style sheet, some browsers
could lose the meaning.
The W3C also notes that some languages (other than English) require the use of sub-
scripted and superscripted text. Here's an example in French: M lle Dupont.
Stylistically, superscripts and subscripts also appear in English. You'll most likely
have seen them in dates or to indicate the presence of footnotes/endnotes:
• The 14 th of September
• The committee report stated that the minister had acted in good faith ii .
In the City Press example, a superscript appears in the date at the top of the page, in-
side a time element, which is discussed next:
A specific date: time
The time element is an excellent addition to the HTML palette, especially for syndic-
ated content. As mentioned at the beginning of the chapter, it defines a specific date in
the Gregorian calendar. It may include a time and a time zone offset, but it doesn't need
to do so. It's best to use the datetime attribute to specify the date/time exactly, be-
cause the actual contents can be fairly loose, for instance:
<time datetime="2011-05-08">Mother's Day</time>
The datetime attribute follows the format YYYY-MM-DDThh:mm:ssTZD (that is,
2011-10-23T10:23:44+05:00). The time and time zone portion are optional.
The only other attribute is a Boolean attribute, pubdate , which indicates the date/
time is the publication date of the nearest article element or, if no articles are found, the
document as a whole. The City Press web page uses this in the footer of its main article
(where the publication date would usually be found):
<small>Posted <time datetime="2011-10-10T12:16:20Z" pubd-
ate>October 10, 2011</time></small>
Note The Z in the time zone offset represents Universal Coordinated Time (UTC),
which is the same as +00:00.