Saturday, June 7, 2008

W3C Validation Linking Tips

W3 in W3C stands for the World Wide Web (W3 or WWW) and the C part is for Consortium, or as a whole: the World Wide Web Consortium. What's the use of these validations? Well, having a valid html/xhtml page ensures you that your page will load properly (and that means how you want or expect your page to display) in all browsers especially those browsers who are W3C compliant. Take note however that not all browsers conform to the W3C standards and you may have to add certain "hacks" on your page to display them right. Rest assured however that major browsers comply to these standards, among them is Mozilla FireFox. Microsoft's Internet Explorer 7 does comply to these except for XHTML's mime type "application/xhtml+xml" (as of this writing, if I am not mistaken) which your page must change to "text/html" whenever it is browsed by IE, but maybe an update from Microsoft will fix it someday.

Anyway, to get to the linking tips.. for an HTML/XHTML page you may validate to W3C's Online Markup Validation or to W3C's Online CSS/Stylesheet Validation page or to both. To validate to W3C easily, just add a text or image link in your page to:

  • "http://validator.w3.org/check?uri=referer" for the markup validation.
  • "http://jigsaw.w3.org/css-validator/check/referer?profile= css3%26usermedium=all%26warning=2%26lang=en" for the CSS3 validation.
Notes: Due to maximum width, the above link was broken into the next line. Make sure there are no spaces or newlines within your <a> (link) tags. Always use lowercase for your tags. For URLs, replace '&' with '%26' or '&amp;'.

When following these links, it will automatically validate the current page you placed the validation link, hence the 'referer' (referrer) parts in the links. If your page does not validate, errors and warnings are listed so you can correct them. The markup validation also has an option to clean up your code so you will know how to correct them, just toggle the "Clean Up With HTML Tidy" option in the validation page.

Currently, this blog is not yet W3C compliant, and is because I used a default template from blogger plus the widgets. But once I get to finish my W3C compliant website then I will concentrate on my blogger accounts. View the html source of my 3D site to learn more on how I linked to W3C.

No comments: