You need a DTD statement, case-sensitive at the very top of each HTML document, even before the <html>, to tell with version of the HTML grammar you are using.
DTDs (Document Type Definitions) are also used with XML. In that case every file format you devise requires its own individually composed DTD to describe what fields are in it.
Here is how to read an DTD tag at the top of each HTML
file.
DTD field | Notes |
---|---|
HTML | this is HTML, not XML |
PUBLIC | this is a public standard, not some DTD you cooked up yourself. |
W3C (World Wide Web Consortium) | who wrote the DTD |
HTML 4.01 | which version of HTML it supports. |
transitional |
|
EN | English |
https://www.w3.org/TR/html4/loose.dtd | url of the DTD computer-readable grammar |
DTD | Notes |
---|---|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN https://www.w3.org/TR/html4/strict.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN https://www.w3.org/TR/html401/strict.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN https://www.w3.org/TR/html4/loose.dtd> |
This is what I use on my ordinary documents |
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN https://www.w3.org/TR/html401/loose.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN https://www.w3.org/TR/REC-html40/loose.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Frameset//EN https://www.w3.org/TR/html4/frameset.dtd"> |
This is what I use on my frame defining pages |
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Frameset//EN https://www.w3.org/TR/html401/frameset.dtd"> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0//EN https://www.w3.org/TR/REC-html40/strict.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN https://www.w3.org/TR/REC-html40/loose.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD
HTML
4.0//EN https://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd> |
|
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Frameset//EN https://www.w3.org/TR/REC-html40/frameset.dtd> |
|
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> |
This is what you might use for very clean HTML. |
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> |
|
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Frameset//EN https://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd> |
|
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML Basic 1.0//EN https://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd> |
|
<?xml version=1.0 encoding=UTF-8?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd> |
This is what you might use if you are preparing an eBook. |
<!DOCTYPE html PUBLIC -//W3C//DTD
XHTML (extensible Hypertext Markup Language) +RDFa 1.0//EN https://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd> |
|
<!DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml> |
for WAP (Wireless Application Protocol) handheld devices |
<!DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.2//EN http://www.wapforum.org/DTD/wml12.dtd> |
|
<!DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.3//EN http://www.wapforum.org/DTD/wml13.dtd> |
|
<!DOCTYPE html PUBLIC -//WAPFORUM//DTD WML 2.0//EN http://www.wapforum.org/dtd/wml20.dtd> |
|
<!DOCTYPE HTML> | |
<!DOCTYPE html> | simplied for HTML5 (Hypertext Markup Language v 5) |
<!DOCTYPE HTML SYSTEM about:legacy-compat> | |
<!DOCTYPE HTML SYSTEM 'about:legacy-compat'> |
There are other more-elaborate XML-layout describing languages: XSD, RELAX NG and Schematron.
This page is posted |
http://mindprod.com/jgloss/dtd.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\dtd.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.97.14.89] |
| |
Feedback |
You are visitor number | |