PDA

View Full Version : W3C compliant


Rhys
7th February 2010, 12:37
Hello All

If I had some W3C validity errors in my website (say 5) would this have a negative effect on SEO and if so, how great is the effect?

I've read in various places that it does have a negative effect but in reality when I've checked a few random websites at the top of Google for competitive phrases, they all throw up errors.

So I question whether it is a problem or not...

Thanks
Rhys

fisicx
7th February 2010, 12:53
No it's not really a problem.

As long as the errors a simple (like unescaped characters) then it's often not worth the hassle of fixing them.

If the error/warning is things like missing alt text then you should fix these as there will be tiny positive effect.

Rhys
7th February 2010, 13:49
OK great - Thanks Fisicx

EitexLeeds
10th February 2010, 13:55
Fixing the issues would be recommended to the is 100% W3C compliant. I don't beleive this will affect SEO but nobody really knows if it does or not except the likes of Google.

RBS
10th February 2010, 18:21
OP,

dont worry:
www.skynews.com has 467 Errors, 130 warning(s)
www.cnn.com 59 Errors, 34 warning(s)
www.forbes.com 205 Errors, 87 warning(s)
www.sex.com 29 Errors, 2 warning(s) :D

NextPoint
10th February 2010, 18:37
OP,

dont worry:
www.skynews.com (http://www.skynews.com) has 467 Errors, 130 warning(s)
www.cnn.com (http://www.cnn.com) 59 Errors, 34 warning(s)
www.forbes.com (http://www.forbes.com) 205 Errors, 87 warning(s)
www.sex.com (http://www.sex.com) 29 Errors, 2 warning(s) :D

What you doing looking at sex.com Rob?:p

I think this one speaks for itself:

www.google.com (http://www.google.com) has 45 Errors, 2 warning(s)

OldWelshGuy
10th February 2010, 18:50
Fixing the issues would be recommended to the is 100% W3C compliant. I don't beleive this will affect SEO but nobody really knows if it does or not except the likes of Google.

And they have released video saying that w3c or clean code compliance is not a factor in SEO :)

HOWEVER. badly written code is another matter as that can have an affect, in as much as it could (if REALLY bad), cause timeout issues, no spiders, no rankings. But in short, if your pages work inbrowsers, then they will be Ok for SEO.

NextPoint
10th February 2010, 19:35
You have to look at it from the search engine's point of view. All search engines are interested in is good quality content - which is the only reason why people use search engines. Whether content is W3C compliant is not an issue to people searching for content and so it isn't for the search engines - when have you heard of someone reading the BBC website and saying either "Damn blasted BBC - I pay my TV license for this and they can't even get it W3C validated!" or "Cool, this page is great because it is fully W3C compliant!". In short, search engines only care if the users care because that's who they target - not us technical people.

On the other hand, well written HTML (not necessarily that sticks to every rule of W3C - after all, they are defined only as guidelines) has advantages for SEO and general maintenance of your website:



Keeps the HTML to only the information so that the search engines only see the information they require - keep styling outside of HTML and separated into CSS.
Sets the context of information so that the search engines can easily see the ways in which keywords and phrases are being used - such as in a list of information, a title, emphasised (e.g. using <strong>, <b>, <i> or <u>).
Allows you to easily update the design without messing with the content.
Keeps to XML standards so that search engines can fully see where elements start and end.
... and many more

cmcp
10th February 2010, 19:38
Yeah, whilst appreciating it's the SEO forum I'd say that building to W3C standards should always be your pathway, it's best practice and makes it easier to keep your site accessible.

NextPoint
10th February 2010, 19:54
Yeah, whilst appreciating it's the SEO forum I'd say that building to W3C standards should always be your pathway, it's best practice and makes it easier to keep your site accessible.
Whilst following their guidelines is good, making a website 100% compliant is generally a waste of time with regards to both SEO and maintenance of the website. W3C validation rules are so strict that if you have a missing alt attribute in an img tag, it will flag an error - and there are sometimes reasons why you may not want an alt attribute such as if you are using a transparent image as a spacer, etc.

HTML that validates by W3C standards doesn't mean that it is cross browser compatible either - I would rather spend my time making sure a website views correctly with the different browsers that people use than to make sure it validates with W3C that nobody uses when viewing your website.

cmcp
10th February 2010, 20:11
First of all, why would you use a transparent image as a spacer? That's bad coding in the first instance. Second, not all images need alt text but for these images they validate when you includes alt=" " in the img tag.

If you build HTML and CSS that is valid and take browser inconsistencies into consideration as you build, your site will look more or less the same in all browsers.

Never mind your site viewing correctly for all the users with eyes, what about it meeting the user experience for ALL users including those with impairments? If you build to standards your site will render correctly much easier.

DotNetWebs
10th February 2010, 20:12
...W3C validation rules are so strict that if you have a missing alt attribute in an img tag, it will flag an error - and there are sometimes reasons why you may not want an alt attribute such as if you are using a transparent image as a spacer, etc...

In that instance all you need to do is use: alt=""

Regards

Dotty

DotNetWebs
10th February 2010, 20:13
... these images they validate when you includes alt=" " in the img tag...

lol you beat me to it!

Regards

Dotty

NextPoint
10th February 2010, 22:30
First of all, why would you use a transparent image as a spacer? That's bad coding in the first instance. Second, not all images need alt text but for these images they validate when you includes alt=" " in the img tag.
I don't know, it's just an example. I'm sure there are some rare circumstances where you would need to and plenty of other reasons why you would want to use an image that didn't require an alt tag.


If you build HTML and CSS that is valid and take browser inconsistencies into consideration as you build, your site will look more or less the same in all browsers.

The point being that W3C valid HTML doesn't mean much. You can make your code W3C valid, but it doesn't add any benefit and sometimes having valid content is outside of your control such as content generated by CMS systems.


Never mind your site viewing correctly for all the users with eyes, what about it meeting the user experience for ALL users including those with impairments? If you build to standards your site will render correctly much easier.
Not really. W3C standards don't take into account things like colour blindness, Dyslexia, Irlen's Syndrome, short sightedness or any of the other vast amount of issues that can make a website less accessible to a user. You could get your website to validate to W3C standards and still not have a website to caters for people in these categories - you could also have a that doesn't conform to W3C standards that caters very well to people in these categories.

My point being is that it's more important to write good quality HTML that works - if you want to waste time making sure everything validates, then I wont complain, but I'm sure your clients will if you are charging by the hour. All W3C standards do is define a very strict set of rules for which HTML, CSS and other web formats should abide to - this is good as a guideline, but not good business wise when you are working with a client's budget and trying to quote for work competitively.

DotNetWebs
10th February 2010, 22:48
... plenty of other reasons why you would want to use an image that didn't require an alt tag...

I still don't understand the point you are trying to make here.

If you want to use an image without an alt tag: use css to place a background-image.

If you want to place it in a img tag: use alt="".

Both will validate just fine.

Can you give us an example of where you "would want to use an image that didn't require an alt tag" and feel you could not meet W3C standards?

Regards

Dotty

NextPoint
10th February 2010, 23:02
Can you give us an example of where you "would want to use an image that didn't require an alt tag" and feel you could not meet W3C standards?

Yes, maybe for some type of decoration that was simply there to make the page look pretty, but wasn't part of the content - like in the way some websites add decorations at Christmas. I know this could be done with CSS, but it's still an example :D.

My point still being that W3C valid HTML doesn't necessarily mean good HTML markup, good content, good accessibility or anything else other than being W3C valid.

DotNetWebs
10th February 2010, 23:12
Yes, maybe for some type of decoration that was simply there to make the page look pretty, but wasn't part of the content ...

But why would you not want to use background-image or alt="" in those circumstances?

That is what they were designed for, they take minimal effort and would ensure your code validates.

Regards

Dotty

NextPoint
10th February 2010, 23:18
But why would you not want to use background-image or alt="" in those circumstances?

That is what they were designed for, they take minimal effort and would ensure your code validates.

I would use CSS, but that's not my point. My point isn't about whether you should use alt in your images either. My point is defined above - as I said earlier, if you feel you must make sure all of your content validates, that's all very good - just don't be thinking it will provide any benefits over regular HTML.

DotNetWebs
10th February 2010, 23:40
... just don't be thinking it will provide any benefits over regular HTML.

W3C compliance a good base to start from and well worth making the effort (if practicable) IMO.

If you code is compliant is should display correctly in any modern browser. If it isn't compliant you increase the risk that somewhere you may have problem.

There are SO many browsers nowadays it's impossible to test for them all. I am not talking about the ones we have on our PCs but the myriad of browsers in smart phones, consoles and other Internet enabled devices.

I have also been caught out in the past by creating HTML snippets that are taken from a parent site and passed into other sites via JavaScript or proprietary Mark-Ups like Facebook [FBML].

For example you may have inadvertently missed a closing tag somewhere. All the major browsers would cope with this and render the page correctly, but this ommison would be enough to cause majors problems if used with a JavaScript framework or FBML etc.

IMO taking the care to try (where practicable) to ensure your code is compliant means you have met the basic standard that the modern web operates to.

I keep saying "where practicable" because there are obviously circumstances where this is outside your control e.g. using 3rd party plug ins or allowing users to enter their own code via a CMS etc.

Regards

Dotty

NextPoint
11th February 2010, 03:16
There is bad HTML that doesn't validate and perfectly fine HTML that doesn't validate - I totally agree with you that HTML should never have missing closing tags. As I mentioned previously, HTML should be written to XML standards, which includes closing all tags and having values enclosed with either ' or ". I tried to check my home page for some type of error, but was out of luck as it validated ok - damn! However, here's the one that showed up on my contact page:


Line 146, Column 14: document type does not allow element "noscript" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <noscript>

A fine example of how W3C gets completely anal about it's strictness. This issue in question is about a Javascript I've put in the page to stop spammers finding my e-mail address. It doesn't complain about the actual Javascript, but the noscript tag - which would cause no issues whatsoever with regards to future HTML edits and kind of goes against W3C being about accessibility, as having to take out the noscript in Javascript would make the page inaccessible to people with Javascript turned off... If I was a client hiring me, I think I would skip hiring me to solve this 1 issue and benefit from having a page that is more accessible to people with Javascript turned off. ;)

cmcp
11th February 2010, 09:54
I don't know, it's just an example. I'm sure there are some rare circumstances where you would need to and plenty of other reasons why you would want to use an image that didn't require an alt tag.Yes, maybe for some type of decoration that was simply there to make the page look pretty, but wasn't part of the content - like in the way some websites add decorations at Christmas. I know this could be done with CSS, but it's still an example .So, we've established you don't know your HTML ;)

The point being that W3C valid HTML doesn't mean much. You can make your code W3C valid, but it doesn't add any benefit and sometimes having valid content is outside of your control such as content generated by CMS systems.It lays a solid foundation on which to build. You seem convinced that W3C is some kind of one trick pony, and it's objectives are just to validate. It makes building sites universal, and provides a standard for these sites to comply to.

Not really. W3C standards don't take into account things like colour blindness, Dyslexia, Irlen's Syndrome, short sightedness or any of the other vast amount of issues that can make a website less accessible to a user. You could get your website to validate to W3C standards and still not have a website to caters for people in these categories - you could also have a that doesn't conform to W3C standards that caters very well to people in these categories.I never said it does. That's your job as a developer, which if you're building to W3C standards will be a lot easier.

My point being is that it's more important to write good quality HTML that works - if you want to waste time making sure everything validates, then I wont complain, but I'm sure your clients will if you are charging by the hour. All W3C standards do is define a very strict set of rules for which HTML, CSS and other web formats should abide to - this is good as a guideline, but not good business wise when you are working with a client's budget and trying to quote for work competitively.My point still being that W3C valid HTML doesn't necessarily mean good HTML markup, good content, good accessibility or anything else other than being W3C valid.If you know how to build correct HTML then it will validate anyway. You're talking as though it's some kind of obsticle, whereas if you know how to build then validation comes naturally. You've already demonstrated you don't know how to build.

A fine example of how W3C gets completely anal about it's strictness. This issue in question is about a Javascript I've put in the page to stop spammers finding my e-mail address. It doesn't complain about the actual Javascript, but the noscript tag - which would cause no issues whatsoever with regards to future HTML edits and kind of goes against W3C being about accessibility, as having to take out the noscript in Javascript would make the page inaccessible to people with Javascript turned off... If I was a client hiring me, I think I would skip hiring me to solve this 1 issue and benefit from having a page that is more accessible to people with Javascript turned off. Paragraph tags should contain inline elements, noscript is a block element. Remove the parent <p> and it will validate.

NextPoint
11th February 2010, 12:40
If you know how to build correct HTML then it will validate anyway. You're talking as though it's some kind of obsticle, whereas if you know how to build then validation comes naturally. You've already demonstrated you don't know how to build.
Now you are just being silly - by your same reasoning you are saying that people who create all of the big websites including Google and Apple can't build a website. Maybe that is why they are successful - because they have better business sense to realise that W3C are guidelines - not rules. If you really think you are better than people who work at Google, you should go and work for them and make sure all of the content is W3C compliant - you should come back and tell me how many days you worked there ;).

Paragraph tags should contain inline elements, noscript is a block element. Remove the parent <p> and it will validate.
Thanks. I would change it if I had to, but the effort it would take to have to put the Javascript in the head and then alter it to be called from a function is not worth the benefit to be gained. This is still a good example of how W3C can restrict you - you may want to spend the extra time for no additional benefit, but some people have a business to run.:D

cmcp
11th February 2010, 14:12
Now you are just being silly - by your same reasoning you are saying that people who create all of the big websites including Google and Apple can't build a website. Maybe that is why they are successful - because they have better business sense to realise that W3C are guidelines - not rules. If you really think you are better than people who work at Google, you should go and work for them and make sure all of the content is W3C compliant - you should come back and tell me how many days you worked there .

No, I'm suggesting that we build to the W3C to maintain a standard. That response is a silly analogy, Google is an extraordinary example. I'm pretty certain the developers at Google will be well conversed in how to build valid code. I'd guess the reason they don't do so is to reduce data costs. You might be intersted to know that Google don't close the body or html tags. Consider the </body></html> to be 14 bytes of data, times however many millions of pages transferred and you start save data by the gig.


Thanks. I would change it if I had to, but the effort it would take to have to put the Javascript in the head and then alter it to be called from a function is not worth the benefit to be gained. This is still a good example of how W3C can restrict you - you may want to spend the extra time for no additional benefit, but some people have a business to run.

No problem. I'd also recommend loading your javascript in at the footer rather than header of the document, to allow parallel downloads.

FreelanceSoftwareDeveloper
11th February 2010, 17:15
www.google.com (http://www.google.com) has 45 Errors, 2 warning(s)

I've looked at that one before too! More errors than words!