The DOCTYPE declaration optionally appears at the start of an HTML document. It comes from the Standard Generalized Markup Language (SGML) that was used to define previous versions of HTML in terms of the language syntax.
The DOCTYPE is used by HTML validation services to determine which version the document uses.
"http://www.w3.org/TR/html4/strict.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
You can see that the HTML5 DOCTYPE is much shorter, easier to type, and easier to remember.
The DOCTYPE is used by HTML validation services to determine which version the document uses.
- The doctype for HTML4.01 looks like this.
"http://www.w3.org/TR/html4/strict.dtd">
- The doctype for XHTML1.0 looks like this.
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- And here is the doctype for HTML5
You can see that the HTML5 DOCTYPE is much shorter, easier to type, and easier to remember.
No comments:
Post a Comment