Tutorials & Script Homepage
HTML/DHTML 36to42
Select Tags (Drop downs)
The Textarea Tag
Why Validate Your HTML ?
Table Tricks
Quirks Mode - Using the DOCTYPE Tag
Web Pages for Everyone
Frames: Why and Why Not
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
HTML/DHTML TUTORIAL NUMBER : 38
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.
This tutorial has been created by: Webdesign.about.com

Why Validate Your HTML ?

Creating Valid HTML Documents Means Cleaner Code and Easier Maintenance

I'll be the first one to let you in on a secret: building Web pages isn't hard. With the software that is available now, you can write your Web page and have it up and viewable in half an hour. And with these tools, why would you need to run an HTML validator on your HTML to find errors? Well, you don't have to, but if you want your pages to stay viewable through future versions of HTML, or you want newer browsers to be able to display it correctly, then writing valid HTML is the place to start.

There are several specific reasons for writing valid HTML, and using an HTML validator to insure that what you write is valid:

  • Future compatibility
    As browsers evolve, they come closer and closer to supporting the standard HTML as written by the W3C. Even if they don't fully support the most recent version of HTML, the browser builders go in and make sure that they are compliant with older versions of the standard.

    If you are writing non-standard HTML, there is a chance that as browsers evolve, they will no longer support your Web pages. A good example of this is a trick that some Web developers used with an older version of Netscape. If you included multiple body tags with different colors, Netscape would load them all in in succession creating a fade-in or flicker effect as the page loaded. This trick no longer works, as it relied on an incompatibility of the browser.


  • Current browser viewing
    Unless you know for a fact that your entire audience is using a specific browser, you are setting your site up to annoy some of your readers if you make it inaccessible to them through invalid or non-standard HTML. Many HTML validators will check your HTML for browser specific entities and alert you to their use.

    Browser specific HTML can be part of the standard (IE supports the <iframe> tag, but Netscape does not) or not a part of the standard (the <marquee> tag is supported by IE and the <layer> tag is supported by Netscape, but neither are a part of the HTML 4 standard).


  • Fewer strange problems
    I am often asked to look at Web pages for people to tell them why the code is doing something strange. I can usually come back in just a few minutes and tell them what is wrong. Why? It's not because I know HTML inside and out, it's because I run their page through an HTML validator. This usually points out a problem with the HTML, that, when fixed, solves their problem as well.

    For example, often people will design a beautiful page with tables and view it in IE. Then, a couple days later their friend calls them up to ask them why they have a blank page up on their site (as viewed in Netscape). The problem is that Netscape interprets the tables standard (the ending </table> tag is required) strictly and IE does not. You could argue that IE is being more flexible, but what if they decide in IE 6 to interpret the HTML standard more strictly? With the merging of XML and HTML into XHTML, this may easily become a reality. And suddenly, your pages no longer work for IE. But if you had written valid HTML, you wouldn't have had that problem.

HTML Validators
There are a lot of validators available. You can get ones that are run on your computer, embedded into your HTML editor, or online on your live Web pages. Here are two of my favorite HTML Validators:

CSE HTML Validator
This is a powerful HTML validator that comes embedded in HomeSite, or you can get a standalone version. It checks your tag spelling, attributes, character entities, quotation marks, missing end tags, invalid nesting of tags, and more. If you are looking for a Windows based validator, this is a great one to use.

Doctor Watson
This is the online validator I use the most. Doctor Watson provides great analysis of Web pages that is easy to use and understand. It is also fast. One of the things I like best about it is the style checking. This isn't of CSS, but rather of how you wrote your Web page and includes warnings about things like using "click here" as a link, and other elements of bad Web style.


I hope this came in useful!
Ask in the forum if you have any suggestions or comments.

This tutorial has been created by: Webdesign.about.com
Web Hosting  |  Membership website templates  |  Dallas Web Design  |  Text Link Adds  |  Art Web Templates  |  Cheap Flight Deals  |  Domain Name Hosting  |  Digital Camera  |  Coursework Writing  |   Youth hostels  |  Internet Marketing  |  Web Design  |  Low Cost Domain Names  |  Burial Life Insurance  |  Website templates  |  Broadband Reseller  |  Dedicated Server  |  Business Broadband  |  Professionelt webdesign firma - webbureau  |  ATX Web Design - Texas TX  |  Flash Templates  |   tablet notebook  |  Machinery moving Los Angeles  |  Flash Intros  |  Web Templates  |  epi suite software  |  Cheap Web Hosting  |  web hosting  |  Website Templates  |  Corporate Logo Design Service  |  ID card printers  |  id cards  |   Free Web Hosting  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Flash Templates  |  Website Templates  |  Power Saver  |  Website Design Quote  |  Flash templates  |  cctv cameras  |  Web Design Manchester  |  Web Templates  |   Flash templates  |  Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Accept Credit Cards  |  Mobile Phone Contracts  |  Car Rental Deals  |  Free domain names  |  Business Email  |  Web Designer Delhi  |  video surveillance systems  |  

 
advertisment
advertisment
advertisment
advertisment
  Top-end templates
  Credit Cards
  Reseller web hosting UK
  free flash tutorials
  Web Hosting
  Hosting Directory
  Corporate Gifts
  Company Logos
  Christian Designs
  Website Templates
  Website Templates
  Web Hosting UK
  Free Web Templates
  Custom site design
  Domain Names
  Logo Design Pro UK
  Free Flash
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Ink & Toner Cartridges
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites