Tags

, , , , , , , ,

HTML declarations known as DTDs (DocType Declarations) are simply telling your browser in which markup language this site is written. Here are some on the most popular definitions.

The DTD tag is the only tag that can be found above the opening tag.

HTML 4.01 DTDs

  • Strict DTD does not allow presentational markup with the argument so CSS should be used for that instead. This is how the Strict DTD looks:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
     "http://www.w3.org/TR/html4/strict.dtd"> 

  • Transitional DTD allows some older PUBLIC and attributes that have been deprecated:
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
      "http://www.w3.org/TR/html4/loose.dtd"> 
  • If frames are used, the Frameset DTD must be used instead, like this:
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 
      "http://www.w3.org/TR/html4/frameset.dtd"> 

——————————————————————————–

XHTML 1.0 DTDs

  • XHTML Strict DTD. No deprecated tags are supported and the code must be written correctly.
<?xml version="1.0" encoding="UTF-8"?> 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  • XHTML Transitional DTD is like the XHTML Strict DTD, but deprecated tags are allowed.
<?xml version="1.0" encoding="UTF-8"?> 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  • XHTML Frameset DTD is the only XHTML DTD that supports Frameset. The DTD is below:
<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 

——————————————————————————–

XHTML 1.1 DTD

  • XHTML 1.1 is the most current finalized revision of XHTML, introducing support for XHTML Modularization. XHTML 1.1 has the stringency of XHTML 1.0 Strict.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml"> 

——————————————————————————–

XHTML Basic DTDs

  • XHTML Basic 1.0:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 
  "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> 
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml"> 
  • XHTML Basic 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" 
  "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"> 
 <html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml"> 

——————————————————————————–

XHTML Mobile Profile DTDs

  • XHTML Mobile Profile 1.0
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" 
  "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
  • XHTML Mobile Profile 1.1
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" 
  "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd"> 
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
  • XHTML Mobile Profile 1.2
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" 
  "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd"> 
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml"> 

——————————————————————————–

XHTML + RDFa DTD

We have two standards running parallel with each other; HTML is the de facto standard for document markup, accounting for millions of items on the web. RDF is a standard for expressing metadata, which in turn provides a foundation for making use of that metadata, such as reasoning about it. Yet the former is very rarely the subject of the latter; meta information placed in the HTML family of documents is often encoded in such a way as to make it difficult to extract by RDF-related parsers. And if it cannot be extracted, then it cannot be used.

Our intention here is to make more of the information that is contained within HTML-family documents available to RDF tools, but without putting an unnecessary burden on authors familiar with HTML, but not with the subtleties of triples and statements. However, for our discussions on how best to do this, we do need to be familiar with at least the principles of RDF.

RDF is about statements and triples. There are a number of syntaxes which can be used to express these triples, such as N3 and RDF/XML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" 
 "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> 
<html lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml"> 

——————————————————————————–

HTML5

UPPER-case is appropriate.

<!DOCTYPE HTML>

——————————————————————————–

XHTML5

This one just like the previous XHTML is always lower-case.

<!DOCTYPE html>
Advertisements