HTML: Basic Tags
<!DOCTYPE...>
Identifies the kind of document that this is; browsers can display different kinds of documents according to different rules, based on what the possible doctypes are. The Doctype also includes a reference to the standard definition, so the browser can, if it needs, get the definitions of the doctype, and draw your document accordingly.
- HTML 3.2 Final The HTML 3.2 specification is now out of date.
- HTML 4.01 Strict In HTML 4.01 Strict, your document is expected to comply absolutely with the HTML 4.01 standard; because this can be difficult,
- HTML 4.01 Transitional will give you a little latitude for sloppiness; similarly,
- HTML 4.01 Frameset will give you the benefits of Transitional, plus the additional Frameset tags, which are not part of the Strict HTML specification.
- XHTML 1.0 Strict HTML is essentially dead; further developments will fall under the XHTML rubric, which is similar, but ultimately quite different. XHTML 1.0 Strict will require your documents to adhere to the absolute definition of XHTML.
- XHTML 1.0 Transitional will give you a little leeway, as with HTML 4.01 Transitional, to work out some quirks and residual old HTML.
- XHTML 1.0 Frameset as Transitional, but with Framesets.
- XHTML 1.1 Strict only, this is the hardest standard to match, but is inevitable.
Example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
This is probably the safest Doctype to use right now. For a document that sets up a frameset, use:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
For more on Doctypes, see A List Apart.
HTML Tutorials
Basics
What is HTML? HTML: Start to Finish Images on the Web GIFs JPGs PNGs Tables and Layouts Content, Form, Action Going Live Web Use StatisticsContent & Structure: HTML
Basic HTML Tags<!DOCTYPE> <html> <head> <title> <meta> <body> <h1> <h2> <h3> <h4> <h5> <h6> <div> <span> <p> <br> <a> <img> <ol> <ul> <li> <b> <i> <pre>
HTML Special Characters Using the W3 Validator