A valid HTML or XHTML document has to include a document type declaration, which specifies which version of HTML or XHTML is used in the document. There is usually no harm in leaving it out as browsers ignores this information, but other tools such as validators often require a document type declaration.
Alpha also uses the document type declaration to only let you use the HTML elements and attributes belonging to the HTML or XHTML version specified. If a document contains a document type declaration then Alpha does the following.
Note. Alpha understands the document type declarations for HTML 4.0 and 4.01 and XHTML 1.0 and 1.1 and ignores all other ones.
The specification for HTML 4.0 was released 18 December 1997 and HTML 4.01, which is a small update was released 24 December 1999. HTML 4.01 is the current [July 2003] official version of HTML. The specification for XHTML 1.0 was released 26 january 2000, and the specification for XHTML 1.1 was released 31 May 2001.
HTML 4.01 and XHTML 1.0 both specifies three document type definitions (DTDs), which vary in the elements they support.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN">
This document type declaration must be used and should only be used for documents defining the frames layout, i.e. documents containing FRAMESET and FRAME elements. For documents defining the content of the frames use either the strict or transitional DTD. If you want to use the attribute TARGET, then you have to use the transitional DTD.
XHTML 1.1 is very similar to XHTML 1.0 Strict, but has been defined to be module-based. Its document type declaration is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN">
Some elements and attributes are defined as deprecated in the HTML 4.01 and XHTML 1.0 specifications. A deprecated element or attribute is one that has been outdated by newer constructs such as style sheets. Deprecated elements may become obsolete in future versions of HTML.
The deprecated elements are APPLET, BASEFONT, CENTER, DIR, FONT, ISINDEX, MENU, S, STRIKE, and U. The deprecated attributes are mostly the ones which concerns presentation, such as alignment and colors.
Alpha support some extensions to HTML 4.01 which were introduced by Netscape or Microsoft. For documents with a HTML 4.01 document type declaration these are obviously disabled. If you want to use extensions do not use a document type declaration in your documents. The elements which are extensions are MULTICOL, SPACER, NOBR, WBR, MARQUEE, BLINK, BGSOUND, EMBED, NOEMBED, KEYGEN, SERVER, LAYER, ILAYER, and NOLAYER.
In the global attribute preferences dialog you can specify two preferences which are related to the DTDs.
When any of these two settings apply and there is also a document type declaration in the document, the largest set of elements and attributes allowed both by the settings and the DTD is used.
Previous page Next page