windows, each displaying a different document. We thoroughly describe this innovation in Chapter 12 .
3.6 The Document Header
3.8 Editorial Markup
Chapter 3
Anatomy of an HTML
Document
3.8 Editorial Markup
HTML 4.0 introduces two new tags that can help groups of authors collaborate in the development of documents and maintain some semblance of editorial and version control. The new insert () and delete () tags let you designate portions of your document's body as either new/added content, or old stuff that should be replaced, respectively. And with special attributes, you may indicated when you made the change (datetime) and a reference to a document that may explain the change (cite).
3.8.1 The and Tags The new and tags let HTML 4.0 authors set off portions of body contents they intend to add to or delete from the current version of their HTML document. HTML 4.0-compliant browsers display the contents of the or tags in some special way so that readers can quickly scan the document for the changes.
and
Function:
Defines inserted and deleted document content Attributes:
CITE ONKEYPRESS
CLASS ONKEYUP
DATETIME ONMOUSEDOWN
DIR ONMOUSEMOVE
ID ONMOUSEOUT
LANG ONMOUSEOVER
ONCLICK ONMOUSEUP
ONDBLCLICK STYLE
ONKEYDOWN TITLE
End tag:
and ; never omitted Contains:
body_content
Used in:
body_content
We can't tell you how browsers will display these editorially marked sections, since the standard does not dictate how, nor are there any browsers yet available that implement the tags. Indeed, today's popular browsers ignore the and tags and blithely render the enclosed content as a regular part of the document.
3.8.1.1 The cite attribute
The cite attribute lets you document the reasons for the insertion or deletion. Its value must be a URL that points to some other document that explains the inserted text.
3.8.1.2 The datetime attribute
Although the reason for the change is important, knowing when a change was made is often more important. The datetime attribute for the and tags takes a single value: a specially encoded date and time stamp.
The rigorous format for the datetime value is YYYY-MM-DDThh:mm:ssTZD. The components are: ● YYYY is the year, such as 1998 or 2001.
MM
●
is the month; 01 for January through 12 for December.
DD
●
is the day; 01 through 31.
T
● is a required character designating the beginning of the time segment of the stamp.
hh
●
is the hour in 24-hour format; 00 (midnight) through 23 (11 P.M.). (Add a following colon if you include the minutes.)
mm
●
are the minutes on the hour; 00 through 59. (Add a following colon if you include the seconds.)
ss
●
are the seconds; 00 through 59.
TZD
●
is the time zone designator. It can be one of three values: Z, indicating Greenwich Mean Time,[ 3 ] or the hours, minutes, and seconds before (-) or after (+) Coordinated Universal Time (UTC) where time is relative to the time in Greenwich, England.
[3] Greenwich Mean Time is also known as `Zulu,' thus the value of `Z.'
For example:
1998-02-22T14:26Z
decodes to February 22, 1998 at 2:26 P.M. To specify Eastern Standard Time, the code for the same time and date is:
1998-02-22T19:26-05:00
Notice that the local time zone may change depending on where the document gets edited, whereas the universal time will stay the same.
3.8.1.3 The class, dir, event, id, lang, style, title, and events attributes There are several nearly universal attributes for the many HTML tags. These attributes give you a common way to identify (title) and label (id) a tag's contents for later reference or automated treatment; to change the contents' display characteristics (class, style); and to reference the language used (lang) and related direction the text should flow (dir). There are also input events that may happen in and around the tagged contents that you may react to via an on-event
Jane Charles
K. Bartholomew
Geraldine O'Hara
Cherie Shaw
Kazuma Kamachi
Patricia Harkins-Bradley
Vickie Johnstone
Tim Green
Mary Malcolm
Michelle Jellen