Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

W3 validation?

Featured Replies

Soooo, You've built a site, it works in all browsers and on all resolutions and screen sizes. You go to the W3C validator and it has a boat load of errors and warnings. Do you then take the time to fix all the errors and warnings or just say because the site works, "that'll do"?

You should always code clean, even if it doesn't actually cause issues.

 

Some errors are caused by things like Facebook integration. The HTML5 boilerplate also throws up a single, interesting error.

 

But if it's just bad code, well, fix it.

You've built a site, it works in all browsers and on all resolutions and screen sizes. You go to the W3C validator and it has a boat load of errors and warnings.

 

It's unlikely you would ever get both of these situations at the same time. If it's not valid your site may be all over the place in some browsers, others are more 'forgiving'.

 

By having a website that is not valid HTML you are leaving it up to the browser to interpret your code, usually they do a good job of dealing with dodgy code but it is best practice to follow web standards.

The validator itself is flawed, it might be fixed now but leave off </body></html> and you can still have a valid HTML5 page.

 

(Just because the validator says it is valid doesn't mean it is)

leave off </body></html> and you can still have a valid HTML5 page.

 

why would anyone do that? The purpose of it isn't to trick the system, it's there as a tool to help you. That's like cheating at a card game of Patience.

Soooo, You've built a site, it works in all browsers and on all resolutions and screen sizes. You go to the W3C validator and it has a boat load of errors and warnings. Do you then take the time to fix all the errors and warnings or just say because the site works, "that'll do"?

 

I expect ALL MY CODE to validate, if it doesn't then I am just not doing a good enough job. That said when integrating something like Facebook or Twitter into a page sometimes you just have to accept non-validation, even though I dislike doing so.

 

"that'll do" will never do for me.

I expect ALL MY CODE to validate, if it doesn't then I am just not doing a good enough job. That said when integrating something like Facebook or Twitter into a page sometimes you just have to accept non-validation, even though I dislike doing so.

 

"that'll do" will never do for me.

 

It's worth doing to flag any bad code but often the validator gives you errors that just aren't realistic to fix. As long as it's well coded and accessible then that's good enough for me, the validator is just a tool for checking a site before launch really.

often the validator gives you errors that just aren't realistic to fix

 

 

Any examples?

 

Excluding things like Fb integration etc.

the validator is just a tool for checking a site before launch really.

 

Checking before launch can be a little too late I think.

 

The way I work is to check as I go and before adding any external scripts, it's much easier to fix problems that way.

The developer toolbar for Firefox is a godsend for this.

 

As Mike says, can you provide examples of errors that just aren't realistic to fix?

Edited by GalaxyTramp

Strictly speaking, your code should be clean from the start. We all make niggly little mistakes, but if you're finishing a site and then finding dozens of errors, you need to refine the way you code and perhaps read up more on coding, semantics and structure.

 

It could also be a organisational issue.

 

And also, make damn sure you're using SVN, at least for anything that is for a client. SVN makes it very easy to manage your code, track changes, revert, etc etc.

Any examples?

 

Excluding things like Fb integration etc.

 

Checking before launch can be a little too late I think.

 

The way I work is to check as I go and before adding any external scripts, it's much easier to fix problems that way.

The developer toolbar for Firefox is a godsend for this.

 

As Mike says, can you provide examples of errors that just aren't realistic to fix?

 

For example "X-UA-Compatible" always pulls up an error but I'd rather keep this in my code than omit it for the sake of validation.

I find it doesn't support/validate ARIA roles very well.

Wordpress and the like are always liable to throw in some dodgy code here and there when it is dynamically generated and like you say things like Facebook have the same effect.

 

This is probably naive of me but in response to GalaxyTramp, I generally trust myself and my coding standards enough to know any errors that need fixing won't be too much of a hassle and will have little to no impact on the look of the site so it is something I feel I can comfortably do toward the end of a build.

It is important to me, one of my checkpoints is to validate the code. I have found sometimes Wordpress causes errors in the HTML5 checker which I'm unable to fix. Overall though for static sites I always ensure they validate :)

This is probably naive of me but in response to GalaxyTramp, I generally trust myself and my coding standards enough to know any errors that need fixing won't be too much of a hassle and will have little to no impact on the look of the site so it is something I feel I can comfortably do toward the end of a build.

 

I agree with you on the trust in ones coding but it is just the way I work. Obviously I do not check validation every couple of minutes, but it can be useful to say, check dynamic output on a page at the time of writing.

I do not know that the validation is so important! I am glad that I got here relevant information about the validation! My English is broken English, I apologize because this :)

The definitive answer: yes. Validation is important, because it confirms that you're writing conforming markup.

 

It's true that not all good markup will validate (and I used to be much more of a standards Nazi than I am) but that's ok as long as you can explain exactly why each validation error occurs (eg, "That error is because the validator doesn't recognise that ARIA attribute".

It is important if SEO matters to you, but it depends on which markup you are dealing with. There are some codings that cannot be validated. I guess, in my opinion, as long as there's not much error and if the site works in all browser, then you'll be fine.

When using W3 Validation, do you girls and guys validate just your HTML? or CSS? or both?

 

I validated all my HTML code so far but noticed my CSS was in a bit of a mess..

 

Input appriecated.

It is important if SEO matters to you, but it depends on which markup you are dealing with. There are some codings that cannot be validated. I guess, in my opinion, as long as there's not much error and if the site works in all browser, then you'll be fine.

 

I completely agree with ninesixmedia here.

 

If you are developing a simple HTML/CSS site then yeah try to validate it, it'll improve things and if it's just HTML/CSS you know you can definitely validate it all. But like ninesixmedia mentioned, if you intend to extend it with additional markup such as Javascript, it will be hard or impossible (depending on what you add) to conform with the validation standards.

 

HTML Validation - http://validator.w3.org/

CSS Validation - http://jigsaw.w3.org/css-validator/

I completely agree with ninesixmedia here.

 

If you are developing a simple HTML/CSS site then yeah try to validate it, it'll improve things and if it's just HTML/CSS you know you can definitely validate it all. But like ninesixmedia mentioned, if you intend to extend it with additional markup such as Javascript, it will be hard or impossible (depending on what you add) to conform with the validation standards.

 

HTML Validation - http://validator.w3.org/

CSS Validation - http://jigsaw.w3.org/css-validator/

 

If you are thinking about SEO then Validation is a must.

Of course validating the (X)HTML is important, like everyone says, if there is something popping up, then it is only going to cause some errors down the line.

 

I always make sure that my code is 100% valid unless its not technically possible, like for some of the reasons mentioned above.

If you are thinking about SEO then Validation is a must.

just for the record, validation doesn't affect SEO in any way. Google use this as an excuse for not making their homepage validate

For example "X-UA-Compatible" always pulls up an error but I'd rather keep this in my code than omit it for the sake of validation.

I find it doesn't support/validate ARIA roles very well.

Wordpress and the like are always liable to throw in some dodgy code here and there when it is dynamically generated and like you say things like Facebook have the same effect.

 

This is probably naive of me but in response to GalaxyTramp, I generally trust myself and my coding standards enough to know any errors that need fixing won't be too much of a hassle and will have little to no impact on the look of the site so it is something I feel I can comfortably do toward the end of a build.

 

The X-UA-Compatible can be achieved via .htaccess, so no need for that error.

When using W3 Validation, do you girls and guys validate just your HTML? or CSS? or both?

 

I validated all my HTML code so far but noticed my CSS was in a bit of a mess..

 

Input appriecated.

 

I tend to do both, especially now I use a lot of css3 techniques.

Paul Irish's view on validation pretty much reflects mine, and is the attitude I believe good developers should be following:

 

Let me take this opportunity to say a little something on validation:

The validator giving you errors doesn't mean browsers won't render your page

as well as they can. In fact, what the validator thinks of your markup is

very very different from what a browser thinks of it. In fact, it's more

like a browser is your friend who is super flexible, even when you were late

to hanging out with him and everything you say to him sounds like a jumbled

mess... He'll totally understand and be as accommodating with your

imperfections as possible.

Mrs Validator, on the other hand, will mark up your papers with red pen

again and again. Yes your thesis is perfect and it's supported with

paragraphs of justification masterfully. Such prose, such rhetoric! But no

you forgot a comma and your "who" should be a "whom" and that semicolon

absolutely should be an em-dash. Do it again!

Meanie. :(

Validation can be a useful tool to make sure you haven't made any egregious

errors. But don't treat 100% valid markup as a goal. There are plenty of

extremely well justified decisions you can make in your markup that will not

validate, like the X-UA-Compatible meta tag. For more thoughts on

validation, I certainly recommend Nicholas Zakas's post:

http://www.nczonline.net/blog/2010/08/17/the-value-of-html-validation/

PS. as an example of how browsers are super accommodating.. You can use all

sorts of HTML5 features even with an XHTML 1.0 Strict doctype. Browsers

don't really give a ****. They make it work.

PPS. (Not that it's a good idea to do this... that's just plain poppycock!)

Also, this by Nicholas Zakas:

 

Let me say this as strongly as I can: validation for the sake of validation is just plain silly. Valid HTML means just that all four tasks completed without errors. There are a lost of things that valid HTML does not guarantee:

 

Valid HTML does not guarantee accessibility

Valid HTML does not guarantee a good user experience

Valid HTML does not guarantee a functioning site

Valid HTML does not guarantee the layout is correct

Having valid HTML code may be a badge of honor that gains you some geek cred, but it is not a measure of success in and of itself. Your code isn’t necessarily better at doing its job than mine.

just for the record, validation doesn't affect SEO in any way. Google use this as an excuse for not making their homepage validate

 

I didn't know that SEO is only a google related term?

What about Bing, Yahoo, MSN, Aol and other you do not consider other search engines for SEO, and foremost what W3C errors do you consider as not affecting SEO, for example missing alt attribute is an Validation error which affects ranking....

Edited by GigafishLabs

I didn't know that SEO is only a google related term?

What about Bing, Yahoo, MSN, Aol and other you do not consider other search engines for SEO, and foremost what W3C errors do you consider as not affecting SEO, for example missing alt attribute is an Validation error which affects ranking....

 

 

You're missing the point.

 

http://www.youtube.com/watch?v=FPBACTS-tyg&feature=player_embedded#!

 

Yes, you should have your Alt tags, and your H1 tags etc setup correctly as you would normally for SEO.

 

But your code doesn't need to actually validate to rank well, and Google does not take into account validation when ranking.

 

So ironing out minor coding errors (non-SEO related) won't affect your rankings.

Edited by brightonmike

This is one of the dangers of SEO for me, so many people make associations between various aspects and rankings that just don't exist. There is no association between W3C validation and Google ranking. There never was, never has, and never will be, and anybody that says there is is making an association that doesn't exist.

 

Made-up, non-existent associations seem to make up 99% of bullsht SEO articles.

It does make me laugh the poor souls you see on here often desperately trying to validate a site that will never validate. Not because it's coded bad but due to the fact the validator won't parse certain extras and so on.

Then people start posting up work-rounds so that code does validate but in the process it becomes bloated and in worse cases it renders worse or they rely on JavaScript to inject something to help the site pass validation!

This is one of the dangers of SEO for me, so many people make associations between various aspects and rankings that just don't exist. There is no association between W3C validation and Google ranking. There never was, never has, and never will be, and anybody that says there is is making an association that doesn't exist.

 

Made-up, non-existent associations seem to make up 99% of bullsht SEO articles.

 

I am referring to all browsers not google only, SEO is the Search Engine Optimization not Google Engine Optimization ;)

 

 

 

 

So basically speaking you can be right about google, but focusing only on google and ignoring the rest is not a good habit. Additionally I am afraid that by saying - ignore Validations - some people who just started to learn might get confused, and ignore actually important things.

Edited by GigafishLabs

I am referring to all browsers not google only, SEO is the Search Engine Optimization not Google Engine Optimization ;)

 

 

 

 

So basically speaking you can be right about google, but focusing only on google and ignoring the rest is not a good habit. Additionally I am afraid that by saying - ignore Validations - some people who just started to learn might get confused, and ignore actually important things.

 

All browsers not Google only? I think you're getting your terminology mixed up.

 

My points apply to all search engines, not just Google, but like most people I tend to just say Google because Google accounts for something like 90% of search engine traffic.

 

Nobody is saying to ignore validation. I am simply saying it doesn't affect SEO. That is a fact.

Why have code that validates? Because it's easy and as a professional it shows that I take pride in my work. The last thing I want is someone to look at a site I made and say to the client that it doesn't validate. Whether that actually makes a difference or not there will be doubt in the clients mind from that point on. Just think how many times you've looked at some ones website and said something like that or how he hasn't commented on his code or how he's used tables.

 

From what I've seen from working with students the ones who's work hasn't validated but still looks okay in a hand full of popular websites have gone around the houses achieving their goal, once shown the valid way they realise how much easier what they were attempting is.

Edited by WBC

Ok, this is great, but take this as an example. I'm using the subscribe widget that comes with Jetpack. It throws up this error:

 

 

Line 532, Column 75: Bad value for attribute action on element form: Must be non-empty.

<form action="" method="post" accept-charset="utf-8" id="subscribe-blog">

Syntax of IRI reference:

Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

 

 

So what are you going to do? You could manually edit the code of Jetpack to fix it, but you don't know why it's doing it in the first place and doing so could break the plugin. Your "fix" would also get over-written every time you update. You could also use another Subscription plugin, but maybe the client has asked for this one. You could write your own but it'd be time consuming and possibly not work as well.

 

Or...you could ignore the error. You know for certain it won't cause rendering issues, you also know the widget works 100% and is not broken. It essentially doesn't matter, it essentially isn't broken. And if it ain't broke, why are you fixing it?

 

And if you're worried about other people validating websites you've made for clients, I suggest you do it yourself and attach it as a report when you hand over the website, explaining in laymans terms each error and why it occurs and why it's excusable.

Edited by brightonmike

In such a case I'd agree with you.

Disclaimer: We are not responsible for the validation of any 3rd party code.

It is better to keep the website clean. My recommendation would be to find time and resources to fix all the issues.

  • Author

I was looking at the mothercare website the other day, out of interest I checked it on the validator site, over 1000 errors....

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.