Table of Contents

About

doctype is a DTD schema definition.

It MUST appear before the first element in the document.

Example

Html

The HTML doctype:

<!DOCTYPE html>
<html>
....
</html>
==== External Dtd declaration ====
[[dtd]]
<code xml>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

Inline Attribute Declaration

Example of attribute declarations

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TABLE [
        <!ELEMENT TABLE (ROW)*>
        <!ATTLIST ROW COL1 CDATA #IMPLIED>
        <!ATTLIST ROW COL2 CDATA #IMPLIED>
        <!ELEMENT ROW (#PCDATA)>
        ]>
<TABLE>
    <ROW COL1="25874" COL2="000005" />
    <ROW COL1="26084" COL2="000006" />
</TABLE>	

Documentation / Reference