HTML and CSS Reference
In-Depth Information
Comments can also be embedded inside SGML declarations for explanatory purposes.
Embedded comments are delimited by two dashes, and a single declaration may contain
many embedded comments:
<!ATTLIST PARAM
name CDATA #REQUIRED -- property name --
value CDATA #IMPLIED -- property value --
valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
type CDATA #IMPLIED -- Internet media type --
>
N
OTE
XML does not use this “--” comment style, so you will not see it in the XHTML
specification.
The DTDs
Now that you understand the fundamentals of reading a DTD, you should consult one to
see the precise syntax of (X)HTML directly for yourself. The latest versions of these DTDs
can be retrieved from the W3C:
•
HTML 4.01 Transitional
www.w3.org/TR/html4/sgml/loosedtd.html
•
HTML 4.01 Strict
www.w3.org/TR/REC-html40/sgml/dtd.html
•
HTML 4.01 Frameset
www.w3.org/TR/html4/sgml/framesetdtd.html
•
XHTML 1 Transitional
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
•
XHTML 1
Strict
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
•
XHTML 1 Frameset
www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd
•
XHTML 1.1
www.w3.org/TR/xhtml11/
Older DTDs can also be found online, including
•
HTML 2
www.w3.org/MarkUp/html-spec/html.dtd
•
HTML 3
www.w3.org/TR/REC-html32#dtd
N
OTE
As previously mentioned, HTML5 does not support a DTD syntax definition approach.
Although when authoring in this language, you may include a simple doctype like
<!DOCTYPE
html>
, as of 2009 the definition of this variation of HTML is not actually specified in SGML or
XML syntax.
N
OTE
XHTML 2 does have a DTD currently found at www.w3.org/MarkUp/DTD/xhtml2.dtd.
However, the specification is far from complete, and there is indication that the language may
eventually be defined as an XML schema rather than a DTD. Furthermore, circa late 2009 there
is a strong indication that the XHTML 2 specification is unlikely to ever be completed.