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  |  Reliable UK Web Hosting  |  dresses  |  Art Web Templates  |  Cheap Flight Deals  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  coches de ocasion  |  Cheap UK Web Hosting  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  Website templates  |  master a distancia  |  Austin Web Design  |  Flash Templates  |  Factory  |   cell phones  |  Canadian Web Hosting  |  Flash Intros  |  Web Templates  |  cartuchos  |  Corporate Logo Design Service  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Website Templates  |  Power Saver  |  taobao agent  |  Flash templates  |  cctv cameras  |  Lolita Dresse  |  china wholesale  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures UK  |  

 
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Web Hosting Reviews
  Web hosting reviews
  Website Design
  Top web hosting
  Stock Photography
  Bildagentur
  Reseller Hosting
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  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