How to make a website | W3C Doctypes and Charactersets

Who control the HTML standard?
The World Wide Web Consortium (W3C) create a standard so that all web browsers can conform to this standard.
Check them out here at W3C
Document Type Definitions
The W3C consortium developed 3 types of document declarations.
Your first line of HTML code should contain a declaration of which version of HTML you are using in the document.
This document declaration is called "Document Type Definitions" or DTD in short. Basically this states the language rule used in html document.
Here are the three DTD's
- Strict DTD
- Loose DTD
- Frameset DTD
1. Strict DTD
Strict DTD is used in documents that uses valid HTML 4markup .
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
2. Loose DTD
This specification is not as strict as strict dtd, but accomodate older markup that is not used anymore. Back compatible.
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
3. Frameset DTD
This DTD is used for a HTML frameset document that uses frames.
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> |
HTML Basic Document Structure
A proper HTML document should comprise of the following 3 parts.
- A Document Type Definition (DTD)
- A Head section
- A body section
Here is an example HTML document structure.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
[Head info {title and meta tags} will be here]
</head>
<body>
[Body {content} info will be here]
</body>
</html> |
Next | Basic web page structure tags
|