Authors’ Details and Publication Dates in HTML

The elements used for providing authors’ details and the publication time for a page are <address> and <time>. The <address> element is used to provide contact information and nothing else, and its content is usually rendered in italics. The <time> element is used to present time in a 24-hour format, date, and time. In reality, anything can be put in the element (i.e., between the tags), and this will be rendered verbatim. However, to include machine-readable information, the datetime attribute must be used. This information is essentially designed for use by user agents in, for example, scheduling users’ calendar, rather than to provide information directly to users, so it is not visibly rendered by browsers. Figure 3.30 shows how the elements and attributes are used, and Figure 3.31 depicts the rendered result.

Notice that the value of the datetime attribute is not displayed, since it is only for use by the user agent. The way it is formatted is to use the complete or precise time format. However, the use of imprecise dates is also permitted. For example, “2015” is read as Year 2015, “2015-12” is read as December 2015, “12-25” is read as 25 December of any year, and “2015- W15” is read as Week 15 of 2015.

Source: Sklar David (2016), HTML: A Gentle Introduction to the Web’s Most Popular Language, O’Reilly Media; 1st edition.

Leave a Reply

Your email address will not be published. Required fields are marked *