Why you should make sure that your webpages are validated? Thats exactly what we're going to answer in this tutorial. Hopefully you've heard off XHTML and HTML. HTML is the older coding and XHTML is the new generation of HTML. This is the web stanadard set by the World Wide Web Consortium (W3C) they set standards for the internet. This tutorial will use references to W3 quite often, so if you haven't heard of them till now you might want to consider checking them out and seeing the work they do.
What is Validation?
Validation is a process of checking your documents against a formal Standard, such as guidelines published by the World Wide Web Consortium (W3C) for HTML and XML-derived Webpages. Consider Validation like Microsoft word for a moment. Imagine you've wrote a 5000 words essay and any spelling mistakes made would mark you down for that essay. To make sure this doesn't happen you would use a spell checker to check grammar and spelling, you could also check it yourself, but a spell checker is more accurate. Validation is like a spell checker it is a precise process and is very reliable. Precise because it deals with languages in the ways browsers work as well as specific machine langauges.
Why Validate?
You should validate your webpages because by doing this, you know you are following web standards set by W3, validation in many people's eyes is a real pain. This shouldn't be the case. Validation is a very important factors of you code and design, I wouldn't be able to thank it enough because it can say you from serious errors occuring in your code as well spot potenial issues that don't neccersarly harm anything but pose a threat. Validation also shows to your visitors that you have taken care in coding your webpages and show that you follow standards set.
Do I have to follow standards?
You are not forced to validate your webpages but, by not validating your webpages your not correctly coding and you could potenially coding bad mark up without realising it. People get confused with the fact that W3 set recommendations. They don't make them, they make recommendations, they are however decicated in setting standards for the world and do a damn good job.
Common thoughts on Validation:
Below are a few comments that people have made on validation:
My site works fine without validation so doesn't it matter?:
This is a common thought on validation and the answer to is it, is simply this. From whats been said your basing it on a visual reference, you can't see what the browser does and interprets, so your basing it on visuals. But what do you know. Do you know your site displays correctly in all browsers and not just your default? And even if it did. Many of the top leading browsers display websites simularly anyway. Maybe you'll get a few margin/spacing differences but other than that you'll get the same look. This is a delibrate feature but just because this occurs doesn't mean you can forget about Validation altogether. Just because your site visually looks fine, doesn't mean your site's coding is hunky dory.
Lots of website such as business websites and even household name websites don't validate!:
While this being true business/company websites really don't get much credit for having a valid website do they? There aiming to get the visitors to be interested in the business rather than validation of there webpages. Despite this they have no excuse but then again can they afford that luxury? As for other non-commerical websites not validating. Thats the webmasters incompitance.
Validation means boring websites, dull coloured and basic designs:
Wrong! Thats a very incorrect statement. You see validation doesn't just mean HTML and XHTML. It can also includes various dynamic coding, different scripting types and more. Validation doesn't make your website boring. It points out the errors and makes sure your not going to get aboard the one way train to "Coding hell"
How can I check my webpages are validated?
Yes it's about time I told you how to make sure your validated. Sorry if there's been alot of information to take in, but some people just don't realise how complex and in depth validation really is, anyway to check your webpages for valid coding you go to the following places
Wait hold up! CSS Validation as well?!
Thats right W3 have CSS validation as well. It's like XHTML but not as complex. There are different levels of CSS, but they will be explained in another tutorial over at the CSS section. For now just read on W3 and there work to get the idea of what they do!
Related Articles
- Form ValidationLearn the different ways of validating your form with Javascript.
- CSS Validation and HTMLHTML validation and CSS validation are controversial issues with some people. This article discusses some of the issues that have come increasingly to the fore in web development. The article will also provide a practical method that overworked webmasters can use to improve their website.
- Why do you Need a Validated Website?This is a very good article for new designers or designers who are big on the visuals but not the programming. Why do you Need a Validated Website? - the author explains it really well.
- Code Validation & Compliancy - The New Beginning XHTMLCode validation is still widely debated as to whether it is required for performance within the search engines. It is only a guess that the search engines dont utilise it within their algorithm, but nobody is actually 100% sure on that fact...
- 7 Benefits of HTML ValidationYou may not bother with html validation or writing simple and clean code when designing your web site. Later you may find your site is slow loading, appears incorrectly in the main browsers and does not rank well for the major search engines...
- E-mail Validation with PHPWhen you register on at a website, the site normally checks if the e-mail address that you enter is in a valid format. This is done by using what called a Regular Expression. What we need to do is check if a string (eg $email) match...
- PHP:Form Series: Validators & Client-side ValidationThis tutorial is really helpful to those of us who are a little intimidated by PHP:form. All of those hard to answer questions are easily explained in this simple to use educational web page. Hope you enjoy!
- HTML Forms Validation On The Client SideForm validation on the client-side is essential - it saves time and bandwidth; you also have better control to show the user the wrong field. This comparison of different validation methods includes comments for improving portability and maintainability.
- What does W3C Validation Stand For?This article will explain this to you if your website is W3C Validated and what W3C stands for and means.
- Form Validation using PHPToday Ill take it up a level and re-write that script using the if, else conditional and empty() function to include form validation.
