HTML and CSS Reference
In-Depth Information
E
APPENDIX
Reading a Document
Type Definition
This appendix presents the Document Type Definitions (DTDs) for HTML 4.01 and
XHTML 1.0. Traditional HTML “dialects” are defined using SGML (Standard
Generalized Markup Language), a complex language with many nuances. XHTML
dialects are developed in XML (Extensible Markup Language), which is a subset of SGML
and slightly easier to work with. This appendix presents the small amount of SGML or
XML knowledge needed to read the various DTDs found online directly.
Element Type Declarations
Two common types of declarations should be familiar to Web developers: element type
declarations and attribute list declarations. An element type declaration defines three
characteristics:
1. The element type's name, also known as its generic identifier.
2. Whether start and end tags are required, are forbidden (end tags on empty elements),
or may be omitted.
3. The element type's content model, or what content it can enclose.
All element type declarations begin with the keyword ELEMENT and have the
following form:
<!ELEMENT name content_model >
The declaration for the XHTML br element gives a simple example:
<!ELEMENT br EMPTY>
This case says we have a br element that contains no content at all—it is empty, as shown
by the keyword EMPTY .
801
Search WWH ::




Custom Search