Specifying Document Type - HTML

One attribute of HTML documents that is frequently overlooked is the Document Type Definition (DTD). This definition precedes any document tags and exists to inform client browsers of the format of the following content—what tags to expect, methods to support, and so forth. The <!DOCTYPE> tag is used to specify an existing DTD. The DTD contains all the elements, definitions, events, and so on associated with the document type. A DOCTYPE tag resembles the following:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”>

This tag specifies the following information:

  • The document’s top tag level is HTML (html).
  • The document adheres to the formal public identifier (FPI) “W3C HTML 4.01 Strict English” standards (PUBLIC “-// W3C//DTD HTML 4.01//EN”).
  • The full DTD can be found at the URL http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics