Motive [Home].Glossary.

Guides

The Motive Web Design Glossary

document type definition (DTD)

The DTD affects the way a webpage displays in different browsers. This is particularly noticeable when setting type sizes and also affects the padding and spacing around elements.

The document type definition (DTD) is the validation standard used by a browsing device when it displays a webpage. The definition specifies the code base used (language) by the webpage (and consequently the elements that are permitted/valid).

Using a linguistic analogy; the DTD is comparable to a dialect. Some words (elements) may be shared amongst dialects, but others will be unique to a single dialect. The ‘big ideas’ are readily understood, but the nuance may be lost. In the case of displaying a webpage, this nuance may relate to the size of the type, space around form elements, etc.

DTD interpretation: strict, transitional, frameset

Due to the constant evolution of standards, DTDs allow for a degree of flexibility. This flexibility is referred to as ‘interpretation’ and can be set to one of three values;

  1. Strict: only code that is pure/correct is used, anything obsolete/deprecated will not be interpreted
  2. Transitional, or loose: allows backward compatibility between the current and older code standards
  3. Frameset: used for frameset validation

document type declaration (doctype)

The document type declaration is often referred to as the ‘doctype’.

The DTD is specified in a document type declaration, the formal ‘presentation’ of the chosen DTD. The declaration is made before the content of the webpage.

Sample document type declaration, specifying a (strict) DTD:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-HTML40/strict.dtd" />

Thanks to Greg Feldman for ‘ironing out the kinks’ in our description

Related terms: deprecated, frames/frameset, quirks mode, elements,tags, validation

 

Motive Web Design Glossary Trivia