HTML Support in Grail


Grail implements all of HTML 2.0 as defined in the proposed standard plus many extensions which have come about through a number of channels. Most extensions have enjoyed some attention by the World Wide Web Consortium, and others have been derived from common practice. This document describes the extensions to HTML 2.0 which are implemented in Grail.

Note that Grail tries to behave reasonably with HTML which is not strictly correct according to any of the often conflicting DTDs which have been published. Many browsers are far from compliant with the content models specified in the DTDs. Grail makes some use of content model information, but usually ``does the right thing'' to be compatible with other browsers. In some cases, handling of illegal HTML constructs is different (more strict) when advanced SGML reconition is enabled.

Changes and Extensions to HTML 2.0 Tags

A
The anchor element supports the TARGET attribute to specify the frame which should be loaded when the link is specified. The TYPE attribute may be used to specify the MIME type of the destination object.
BASE
The TARGET attribute may be used to specify a target frame.
BODY
The attributes ALINK, BGCOLOR, LINK, TEXT, and VLINK are implemented to emulate those attributes on other browsers.
H1 .. H6
The heading tags have been extended with many of the attributes suggested by the HTML 3.0 initiative, including ALIGN, DINGBAT, SEQNUM, SKIP, and SRC. The ALIGN attribute supports the values LEFT, CENTER, and RIGHT. Grail supports automatic numbering of headers automatically if it encounters a heading element which uses either the SEQNUM or SKIP attribute. The best way to make use of this capability when using Grail is to use one of these attributes with the first header in the document; SKIP=0 is good for this and will not create any adverse side effects. If both the DINGBAT and SRC attributes are used, the DINGBAT attribute will take precedence.
HR
The horizontal rule element has been extended by the addition of the attributes ALIGN, COLOR, NOSHADE, SIZE, SRC, and WIDTH. These attributes were previously implemented by one or more popular browsers. WIDTH can take values which specify the number of pixels or a percentage of the current text width. If the SRC attribute is specified and image loading is enabled, the image specified by SRC is loaded instead of using the default rule representation. SRC is ignored in printing. The SRC attribute has been described by the HTML 3.0 initiative.
IMG
The USEMAP attribute can be used to specify the URL of a client- side image map defined with the MAP and AREA elements.
ISINDEX
The HREF and PROMPT attributes are handled. Their behaviors are as described by the HTML 3.0 initiative.
LI
The DINGBAT attribute can be used to specify a dingbat to use as a bullet for the list item in UL elements; the TYPE attribute allows specification of CIRCLE, DISC, or SQUARE. In an ordered list, TYPE can be "I", "i", "A", "a", or "1" to indicate, respectively, upper- and lower-case roman number, upper- and lower case alphabetic sequences, or arabic numbers. The use of DINGBAT affects only the element with the attribute, while TYPE affects subsequent bullets within the same list until another TYPE attribute is specified. This behavior is compatible with other browsers.
P
The ALIGN attribute described by the HTML 3.0 initiative has been implemented to the extent allowed by the Tk text widget. The attribute value LEFT, CENTER, and RIGHT are supported.
UL
The DINGBAT attribute can be used to specify a dingbat which will be used as a bullet for each item in the list; DINGBAT is modelled on HTML 3.0. The TYPE attribute can take the value CIRCLE, DISC, and SQUARE to specify the bullet type as well. This is similar to other deployed browsers.

Tags Not Defined in HTML 2.0

APP
APPLET
OBJECT
PARAM
These elements represent one of the more volatile areas of discussion among Web developers. The support provided by Grail is based in part of the behaviors implemented in other browsers and draft documents being considered by some committees. For more information on the support for these elements in Grail, refer to Writing Grail Applets.
AREA
Content of the MAP element. Each element of this type describes a single region with a client-side image map. Supports the RECT, CIRCLE, POLY, and DEFAULT values for the SHAPE attribute.
BIG
SMALL
Adjust size of the displayed text upward or downward as indicated by the name of element. These are only supported in printing.
CENTER
This element is modelled after support found in other browsers. This is equivelent to <DIV ALIGN=CENTER>, which should be used in lieu of this element in all cases.
DEL
This phrase-level element represents logically deleted text; this may be of use in legal documents or in groupware applications. Grail represents text enclosed in the DEL element as red italics. Color is not supported in the printed representation.
DFN
The DFN element is used to mark the defining instance of a term. Grail renders this in italics. This element is described by the HTML 3.0 initiative.
DIV
The DIV element is used to mark arbitrarily large block structures within a document. The contents of a DIV element may be as small as a single paragraph or as large as the entire document. DIV elements may be nested. The ALIGN attribute specifies the preferred alignment of text within the division; the values LEFT, CENTER, and RIGHT are supported in Grail. This element was introduced by the HTML 3.0 initiative.
FN
The ``footnote'' tag is handled in a manner similar to an anchor tag (<A>) with the NAME attribute specified. Effectively, the markup <FN ID="name"> is synonymous with <A NAME="name">. This tag is described by the HTML 3.0 initiative. Though the (now expired) HTML 3.0 internet draft recommends the content of the FN element be displayed in a pop-up window when a link to the footnote is selected, Grail does not support this display mechanism.
FRAME
FRAMESET
These elements support Frame Sets much like those supported by Netscape (but without JavaScript). See Netscape's documentation on frames for more information.
INS
This element is complementary to the DEL element, and represents inserted text. Grail represents textual content within this element as dark green italics. Color is not supported in the printed representation.
LH
The ``list heading'' tag is supported. Textual content of LH elements are rendered as bold-italic if no other typographic controls are used within the element. The heading is located over the list items. A single blank line is placed between the header and the contents of the list items, unless the COMPACT attribute has been set or inherited.
MAP
Each MAP element defines a client-side image map.
S
This is a font-level element specifying overstruck characters. This is not supported for printing. This is described in HTML 3.0. Not supported in printed documents.
SCRIPT
Contents of the SCRIPT element are discarded rather than displayed.
STRIKE
This logical phrase-level element specifies overstrike characters in red. It is not supported in printed documents.
SUB
SUP
Subscript & superscript support is only implemented for the PostScript generator. Each of these elements causes enclosed text to be rendered smaller than the surrounding text by the same amount as would be the case if the SMALL element were used, but with the baseline adjusted upward or downward appropriately.
TABLE
Support for the HTML 3.0 table model is incomplete, but should support most of the tables actually found on the Web. For complete information Grail's implementation of TABLE and its associated subelements, refer to Tables in Grail 0.3.
STYLE
Contents of the STYLE element are discarded rather than displayed.
U
Underlining is supported for this font-level element. This is described in HTML 3.0, but was implemented by some browsers at an early date.