Description

The DOCTYPE states which standard the document will adhere to.
The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document.
It defines the document structure with a list of legal elements and attributes.
A DTD can be declared inline inside an XML document, or as an external reference.

Source: http://www.w3schools.com/dtd/dtd_intro.asp

Attributes

The DOCTYPE does not require or allow any attributes.

Examples

The XHTML 1.0 Transitional declaration allows certain presentational elements that are not permitted in XHTML strict.

If the DTD is declared inside the XML file, it should be wrapped in a DOCTYPE definition with the following syntax:
< !DOCTYPE root-element element-declarations >

If the DTD is declared in an external file, it should be wrapped in a DOCTYPE definition with the following syntax:
< !DOCTYPE root-element SYSTEM "filename">

(*Please note that there should not be a space between "<" and "!" in the previous examples)

Source: http://www.w3schools.com/dtd/dtd_intro.asp


Page Information

  • 11 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts