Slide 2.26: HTML fonts
Slide 2.28: HTML head
Home

Why Use HTML 4.0?


HTML tags were intended to define the content of the document like:
  <p>This is a paragraph</p>
  <ul>This is an unordered list</ul>.
When tags like <font> and color attributes were added to the HTML 3.2 specification, it started a developers’ nightmare. Development of large web sites where fonts and color information had to be added to every single web page, became a long, expensive and unduly painful process.

What Is so Great about HTML 4.0 ?
In HTML 4.0 all formatting can be moved out of the HTML document and into a separate style sheet. Because HTML 4.0 separates the presentation of the document from its structure, we have got what we always needed: Total control of presentation layout without messing up the document content.

Prepare Yourself for XHTML
XHTML is the next generation of HTML. You should start preparing for it now. The most important thing you can do is to start writing valid HTML 4.01. Also start writing your tags in lower case. Always close your tag elements. Never end a paragraph without </p>.

Validate Your HTML Files as HTML 4.01
An HTML document is validated against a Document Type Definition (DTD), which is added as the first line of the file. The HTML 4.01 Strict DTD includes elements and attributes that have not been deprecated or do not appear in framesets:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

Test your HTML with the W3C validator by entering your page address:
       

Demonstration
The following demonstration shows how the HTML script is displayed on the Web.