19. why use HTML 4.0 ?

Why use HTML 4.0?

HTML 3.2 was very wrong!
Enter HTML 4.0

HTML 3.2 very wrong

the original HTML was never intended to contain tags for formatting a document.
HTML tags were intended to define the content of the document like:
<p>This is a paragraph</p>
<h1>This is s hesding</h1>

when tags like <font> and color attrivutes were added to the HTML 3.2 specification, it started a nightmare for web developers.
development of large websites where font and color information had to be added to every single webpage, becomes long expensive, and unduly painful process.

Enter HTML 4.0

In HTML 4.0 all formatting can be removed from the HTML document and stored in a separate stylesheet.
Because HTML 4.0 separates the presentation from the document structure, you finally get what you needed: Total control of presentation layout without messing messing up the document.

What should you do about it?

Do not use presentation attributes inside your HTML tags if you can avoid it. Start using styles!
Do not use deprecated tags.

Validate your HTML Files as HTML 4.01

An HTML document is validated aginest a Document Type Definition(DTD).
Before an HTML file can proparly validated, a correct DTD must be 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">

The HTML 4.01 Traditional DTD includes everything in the strict DTD plus deprecated elements and attributes.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

The HTML 4.01Frameset DTD includes everything in the transitional DTD plus frames as well
<!DOCTYPE HTML PUBLIC "-//wW#C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Test Your HTML with the W#C Validator

If you want to check the markup validity of web documents in HTML, input your page address (such as www.w3schools.com) in the box at the Markup Validation Service.
The Validator is maintained by the W3C

http://validator.w3.org/ 

No comments:

My Favorite Books

  • C and Data Structures by Ashok N. kamthane
  • Web Technologies by A. A. Puntambekar
  • Learn HTML and CSS with W3Schools
  • Learn JavaScript and Ajax with W3Schools
  • HTML5 Black Book: Covers Css3, Javascript,XML, XHTML, Ajax, PHP And Jquery
  • HTML5 Application Development Fundamentals: MTA Exam 98-375
  • .NET 4.0 Programming 6-In-1, Black Book
  • SQL Server 2008 R2 Black Book
  • Asp.net 4.0 Projects Covers: net 3.5 And .net 4.0 Codes, Black Book
  • UNIX Shell Programming 1 Edition by Yashavant Kanetkar
  • UNIX and Shell Programming 1 Edition by Richard F. Gilberg, Behrouz A. Forouzan
  • Computer Networks by Andrew S. Tanenbaum
  • Multiple Choice questions in computer science by Timothy J Williams