文書型定義。SGMLアプリケーションで使用される要素(エレメント、タグのセット)を定義したもの。また、XMLではDTDの書式がスキーマ言語として使われている。
DTDの例として、HTML 4.0]Strictの一部を抜粋・加工した。
<!--================== Imported Names ==================-->
<!-- Feature Switch for frameset documents -->
<!ENTITY % HTML.Frameset "IGNORE">
<!ENTITY % ContentType "CDATA"
-- media type, as per [RFC2045]
-->
<!ENTITY % ContentTypes "CDATA"
-- comma-separated list of media types, as per [RFC2045]
-->
<!ENTITY % Charset "CDATA"
-- a character encoding, as per [RFC2045]
-->
<!ENTITY % Charsets "CDATA"
-- a space-separated list of character encodings, as per
[RFC2045] -->