Don Pedro's®            Capt. Peter - web design

Validate your Webpage Code

Once your website is up and running you should check your HTML code is correct (= validate your webpage code).
This page explains why and how.

Site Goldaward - Pakistani Maritime  International Association of Webmasters and Designers
Site Gold Awards for Excellence on the Web in 2004
Classification: Maritime, Marine, and Boating

Last up-dated: Dec. 15, 2009

At the bottom of the page,
there is a link to a print ready version.
Why Validate?
HTML and CSS Validators
Instant Web Page Validation
Common Comments
JavaScript
This page is best in any browser
Check Menu
Please note: Every link on this page opens in a new window. If your "Pop-up killer" is too efficient it can also stop new windows. When this happens, please press "Ctrl" and click on the link you want.

Why Validate?

Even if there are no obvious errors or mistakes, the search engine "spiders" (robots) are reading your HTML code as written. IF there are small errors, it will affect your listings, even if most browsers display the page correctly.

The validator tells you, not only if the web page code is correct or not, but especially if it is up to current standards. Consider there are surfers on the net, that are either themselves disabled to a lesser or greater degree, or are using bad or slow connections.

Furthermore, the browser manufacturers are coming under strong pressure to make their programs more strict. The browsers will, however, continue reading also simple HTML because there are hundreds of millions of web pages made according to "old" standards" (backwards compatibility). Some browsers, however, are more strict than others. Explorer, which is used by a great majority of surfers, is said to be the least strict one. IE 7 is little bit more standards compliant than version 6 but people have been very slow to change over to this browser.

HTML and CSS Validators

W3C HTML Validator
"W3C" validates only HTML 4.+ and requires DOCTYPE and charset tags. If you use the "Transitional" Doctype this validator sometimes accepts some HTML error. Make a double check with one of the others. You can upload your page code and pre-validate before publishing your new web page.

W3C CSS Validator
CSS validator. First you validate your HTML / XHTML code separately. Then you can validate your Cascading Style Sheets either from your web page or by uploading your page code or css file only. I suggest you - just to be sure - check your code also in a code checker if you are using the transitional Doctype.

The following are not really validators, very strictly speaking they are code checkers, or in "Computerese": lint programs.

WebXact
To make your site accessible and enjoyable to a maximum number of visitors, go to WebXact (ex. Bobby). Click on the question marks "?", and you will get WebXact's comments for that particular item. "WebXact" concentrates on accessibility.

Not every designer makes accessible pages. All British Government Agencies are by law obliged to make their websites / pages accessible for disabled people. The requirement extends also to other sites, to which those Agencies are providing links. The British Coast Guard, for instance, offers a big font size version. I would expect the European Union by and by to follow the British example. Better stay a step ahead.

US Law, Section 508 [29 U.S.C. '794d] from 1998, requires Federal agencies to make their electronic and information technology accessible to people with disabilities.

Dr. Watson
Dr. Watson validates regular HTML. You can also get:
  • Image and regular links check (outgoing links)
  • Check your spelling
  • Compute estimated download times (see also Don Pedro's Download vs. Display Time)
  • Search Engine Compatibility
  • Link Popularity (from Altavista)
Alpine Doctor
Especially after you have changed your code, I would suggest you check your web page code at Alpine Doctor. You get comments on what is not so good with suggestions for corrections. You even get a repaired file, which you can either use as such (if you like) or just adopt those changes you think are necessary. It helps to find small errors - like "extra" end tags - those the browsers ignore, but search engines notice. The "error warnings" part consists of your code with code errors marked with a red ^ mark directly below the error with a comment also in red.

Alpine Doctor reads only down to the second level in your site structure. If you have your pages on the 3rd level or lower, this validator cannot get your pages and you have to use another one instead.

Different Site Structure Levels:
www.donpedrowebdesign.netfirms.com/page.html
Level                            1                                     2
www.angelfire.com/ok4/donpedroshipping/page.html
Level             1              2                 3                  4

Total Validator
Total Validator (8.2 MB), free basic version. Does validate local files. Choose HTML version, accessibility level, broken links check, spell check: English (US - UK), Français, Italiano, or Español. For each type of error you get a good explanation and suggestion how to correct it.

"HTML Help's" HTML validator and CSS code Checker.
You can validate your web page HTML code or you can pre-validate your code before publishing (uploading) it on your server.

CSS code checker. An excellent complement to W3C's validator when you are using the transitional code.

CSE Lite HTML Validator.
This you can download for free personal non-commercial ( non-professional ) use (10.5 MB). It's a "stripped" HTML validator handy to use when making a new page or changing an old one. You can also check your spelling with this "validator". Especially if you have a slow modem / telephone dial-up connection you can pre-validate before uploading.

Remember to re-validate with at least two on-line validators after uploading.

Instant Web Page Validation

Do you want to check how the validation / code checking works in reality?

You can do it straight away. Just type in or paste an URL (web page Internet address) in the "location bar" and click "Check". Take for instance this page, the banner code will show a lot of errors but I don't have control over that. Or you can type in the URL for one of your own pages. Don't type in http://, it is there already.

NEW! Check any web page online with CSE HTML Validator Lite.
Add this form to your site.


I have the same program on my own computer. That way I can check any changes I do immediately, regardless of any connection to the Internet.

This form is not included in the printer-friendly version.

 

Common Comments

All validators have a few things in common because they are computer programs. They don't "understand" why you are using a certain code / command.

In the validation result, make a difference between errors and warnings. Errors you must correct, but warnings are just that. It's up to you what you do, they tell you about potential problems. These problems can appear in some browsers but not in others.

Some comments will be about banner codes. You have no control of these, but luckily most browsers will disregard any nonsense code. The worst banner code I have seen, so far, stated: "weight=height"! The only code you can trust is the one you have written, checked, and validated yourself.

The main comments should be, either about an ALT tag for your pictures, or a comment about those tables you have used for layout of your page. In your picture "call-up" code you should, after giving the measurements, use an ALT="Name/description of picture" tag.  For info about the "alt" tag see Don Pedro's "Alt" and "title" Tags.

The search engines do read the ALT tags. So you should try to write the tags using words relevant to the content of your page. These words will be indexed in the search engines' data base.

The validators do not accept dynamic URLs because of symbols like: &, ?, etc. If this is the only matter that makes your page code "invalid" you can change the long dynamic URL to a short one in the approved HTML form at "tiny url". This works as a redirection so it doesn't help you with the search engines. The spiders do not "like" redirecting links and wont follow through.

The "&" symbol can by some browsers be misunderstood, especially if the URL has "&section". This can by some "smart" browser be taken as §ion, because they "think" you have forgotten the semi-colon (;). Instead of "&" you can type in the code: "&section", which will be translated by the browsers as "&section" and that's what the server will "see". I have checked it and it works.

The <title> tag is required in all HTML documents, it's not only for search engines.

Even if your web page does validate it's still not sure it will show up the same in every browser.

JavaScript

If you are using some JavaScript, check your HTML-code first with a validator (see above), then you can go to "anybrowser.com/" and check the total result in many different ways - for free.

Free tools to view and check your web pages in different ways.
More info on dynamic URLs from Bravenet resources.

Related page:
| Character Sets and Language Tags |
 
















Locations of visitors to this page
Home

Site Map

Free Backgrounds

Free Pictures

Website Design Handbook

Computer Viruses and Worms

Hide Your E-mail Address

How to Choose Website Colours

How to Change my Pictures and Photos

Reduce Picture Size

Reduce Picture File Size

How Protect my Pictures

Webpage Optimization

SEO Check-List

Website Promotion

Search Engine Marketing

List of Search Engines


Website Design and Promotion Search
Powered by Google


Return to TOP

Get version (3  pages small font, 4 pages normal)

© by Capt. Peter Forsberg.
You are allowed to print out the text for your personal needs.
You are also allowed to copy and distribute the printout for educational purposes when free of charge,
as long as you give the source: www.donpedrowebdesign.com/validate.html.

Last updated:
Dec. 15, 2009

Visitor counter
Since Oct. 22, 2004,
according to www.digits.com/

eXTReMe Tracker