Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 
Positioning tips.
search engine optimization story search.
Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format


Increase traffic.
Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 

HTML Tip:
Why Valid Code Matters

by Larisa Thomason,
Senior Web Analyst,
NetMechanic, Inc.

  
December 2003
Vol. 6, No. 20
 • Promotion Tip
 • HTML Tip
 • Beginner Tip
  

Why do many webmasters - who are so meticulous about every other aspect of design - ignore one of the basic components of a good Web site? Many just don't how important valid HTML code is to both page display and site promotion.

A Widespread Problem

The World Wide Web Consortium (W3C) Quality Assurance Interest group estimates that 99% of Web pages contain some invalid HTML code. Although they're careful to note that:

"…there are no statistics to support this. It would be interesting to run a survey to prove that this case is indeed true."

Dagfinn Parnas, a graduate student at the University of Bergen, did just that for his Master's thesis and the results are startling. The entire thesis is posted online in PDF format. Be patient though: its 125 pages take a while to download even over a fast connection!

In summary, Parnas randomly selected 2.4 million different URLs from the Open Directory Project's (ODP) index and evaluated how well the HTML code on each page complied with W3C coding standards. And, as the W3C Quality Assurance group predicted, the vast majority of the pages did indeed have invalid code.

Of the 2.4 million pages that could be evaluated, only a small fraction met W3C standards:

Invalid code 2,034,788 99%
Valid code 14,763 .007%

When discussing his results, Parnas notes dryly:

"There is little correlation between the official HTML standard and the de-facto standard of the WWW."

The Five Most Common Problems

At first glance, the most common problems don't really seem to be all that important:

  1. No Document Type Definition (DTD) declaration
  2. Missing required attribute
  3. Non-standard attribute
  4. Omitted end tag
  5. End tag not open

So what if you're missing a DTD declaration and used a non-standard tag? So what if you forgot to close a paragraph tag or delete an extra tag? Modern browsers know what you meant to do and display the page anyway, right?

Not always.

Internet Explorer, the most commonly used browser, is also the most forgiving when it comes to errors. Lazy and/or inexperienced coders think that's great! If the page displays properly without a lot of effort, why worry about validation?

Mainly because invalid code causes problems more problems than most people realize.

Problems Caused By Bad Code

Invalid HTML code can cause display problems that turn away visitors and hurt search engine promotion efforts.

  • Browser display problems: Even the simplest errors can cause big problems - particularly in browsers like Netscape and Opera. They adhere more stringently to W3C standards. Although Explorer may ignore a problem like a missing closing TABLE tag, Netscape ignores the entire table and all its contents.

    Other errors can be equally damaging. Learn more in our online Browser Display Tutorial.

  • Accessibility problems: Screen readers (an assistive technology used by many people with vision problems) are basically simple text browsers. They often have problems with HTML code errors - particularly missing attributes.

    Learn more about Web accessibility at our online Accessibility Resource Center.

  • Incorrect search engine indexing: Search engine spiders are also basic text browsers. While an advanced browser like Explorer 6 or Netscape 7 may not care if you forget to close some quotation marks inside a tag, a search engine spider does!

    Coding errors may hide large amounts of your page content from search engines - even though human visitors see the content with no problem. That is, if they can find it. Learn more about this problem in our December 2002 Webmaster Tip Bad Code Hurts Your Search Engine Rank.

It seems strange to consider that a few coding errors could cause all those problems, but it's true. You could be losing customers and not even realize it!

Why People Have Bad Code

So why isn't every webmaster scrambling to validate the correct their HTML code? Mainly because they either don't realize their code has problems or they don't know enough about HTML code to correct the problems themselves.

The W3C article notes several reasons for the huge number of invalid pages:
  1. HTML editors don't conform to W3C standards. Front Page, one of the most popular HTML editors allows users to include proprietary HTML tags and use special server functions that only work on servers that are properly configured. Be careful when using an HTML editor. Check the instructions and learn how to configure it to write only valid HTML code.

  2. Incorrect information in books. Even some newly published how-to books contain incorrect information about coding. But often the problem comes from using outdated Web resources. Check the copyright date on your reference books and consider upgrading to the latest edition if your book is more than 2-3 years old.

  3. Microsoft Word "save as Web page" function. Microsoft Word, a popular word processing program, contains an option to save the word-processed document in HTML format. This is almost always a mistake! Refer to our August 2001 Webmaster Tip ""Don't Save That File!" to learn more about the pitfalls.

Automatically Correct Errors

It's easy to find out if your HTML code has validation problems. There are several good online validation programs.

  • The W3C offers a good online validation tool that spots coding errors. It's free and relatively easy to use.

  • NetMechanic's HTML Toolbox offers even more features. The free version alerts you to errors inside your HTML code, spots common spelling errors, identifies broken links, lists potential browser display problems, and tests page load time to detect slow-loading pages. The subscription version also corrects HTML errors for you and generates a corrected page you can upload directly to your server.

No matter how you decide to find and fix coding errors, it's critically important that you do it! Just because a page looks good in your browser doesn't mean that other visitors - and search engine spiders - are having the same enjoyable experience.



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.