I want to learn how to be a good coder and make sure my code always validates but when no large sites validate what is the point? I looked at the following: Microsoft.com - 9 errors Google.com - 55 errors vBulletin.com - 15 errors Yahoo.com - 34 errors So my question is, how important is it really to make a site validate?
Hello, I dont know if I can understand what are you looking for, but maybe this can help you to check your site. http://validator.w3.org/ Best, Jakomo
Ultimately is the sign of quality - that someone has taken the time to ensure there coding is effective and effeciant! Having valid code: Makes quicker easier indexing of code Makes pages load potentially faster (although probably only by a couple of milliseconds) Makes page sizes potentially smaller (potentially by a couple of k) Ultimately its a sign of quality... Im sure someone else will be able to add a few additional positives...
That is what I was using to validate the sites but they don't, I just was interested to know how important it is for me to work on making my future sites validate as my current ones do not.
All the sites I have at the moment are old, I am working on HTML/CSS/PHP at the moment but wanted to ask this question more as a random question really because so many sites don't actually validate.
Many sites don't fully validate, but look at google for example. Actually poor coding BUT what does it matter, it's a mostly blank page with a search button and a list of links. That's it. They don't list a doctype, throwing IE into quirks mode-- but with only 2 items on the page, it looks and acts the same. They throw everything onto 3 lines to make the page load a picosecond faster -- woopdedoo. Why wouldn't you want your site's code to look like Google's? First, you want to be able to read the code easily so you can change stuff/fix stuff. And so, proper indenting and comments. You probably have more than one search box on your page and various stuff positioned a certain way. Valid code does this, and for all browsers. Yahoo's site is a coding nightmare. Look at their code. Would you want to wade through all that crap on your site to find some little problem? They have big sections of "If IE..." code... tons of scripts, hacks, and redundant classes... and took a good time to load all that garbage. (Why I search with Google and not Yahoo). Microsoft.com... yeah like they care. It's Microsoft. Makers of the browser that can't correctly adhere to the standards. Making sure you don't have validation errors also helps you iron out whatever bugs you have as you build your site or add new things to it. If something doesn't look or act right, at least you know it's not because of something like an unclosed tag somewhere. If you're selling something with your site, or have a community there, you wouldn't want to kick the disabled in the ass with crappy code that their browsers can't correctly interpret. Valid code (can) make sites more accessable-- to ALL customers, not just those who see fine. Blind dudes buy stuff too. So do people with dial-up (who may have images or CSS turned off because image-heavy pages take forever to load). Valid sites look better for them too. So, there's a few reasons.
I think it's 8 out of the top 10 websites (for traffic) don't validate. Mostly cause they just don't care enough, people will go to their site anyway, and they have the money to have their files a kb bigger or whatever.
The most popular sites will (IMO) never be valid because sh!t just moves too fast and they just don't have enough time to make it all valid. Think about all those news articles goin' out, being updated every single # of minutes (disregard Google which has crappy front end code). Sites that get updated every 5-6 months (like a personal site) will probably have less or none errors because you have too much time and not enough things to worry about.