Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

What W3C errors that cause googlebot problems?

         

Northstar

2:16 pm on Oct 1, 2008 (gmt 0)

10+ Year Member



Can anyone tell me what W3C errors would cause problems for GoogleBot? I have an average or 200 errors in W3C validator on most of my pages. I have tried to fix some of them but it is very time consuming and sometimes of the errors it is hard to understand what the issue even is. Most of my errors are the following:

document type does not allow element "TABLE" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag.

required attribute "ALT" not specified.

end tag for element "A" which is not open.

tedster

2:47 pm on Oct 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The nastiest crawling problems are really indexing problems, since googlebot will take any character string you throw at it. They come from apparently small errors - you forget to close quote at the end of an attribute value, or you hand edit some code and accidentally snip off a "<", leaving the tag technically open.

The W3C validator may not tell you directly that you did either of these two things. It often cannot, because the characters at that exact point and just after it can still have the possibility of being valid.

Instead you'll get an error at the very first point of failure - the spot where your mark-up no longer conforms to valid patterns without any ambiguity. When Google tries to index that page, they will have the same problem. Characters that you intended as content can end up looking as though they are part of the tagging - they may not get indexed.

So the actual fix you need to make can be hidden in a pile of error messages - validation problems that all cascade from a single small thing.

The key is to fix the first error, then validate again. Even 200 errors can clear up with a small number of fixes. The table error you mention is common if there is an issue in tags, just a bit earlier in the mark-up.

If you need help understanding a particular error message, even when you begin by fixing the first error and working in sequence, the members in the HTML & Browsers forum [webmasterworld.com] here are usually very good with that kind of help.

dstiles

10:48 pm on Oct 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Don't forget, Northstar, that some browsers are also unforgiving. In general (although not always) MSIE lets through all but serious coding errors - it's an MS thing :) Firefox and Opera may render the same code badly or not at all. Or let through errors that MSIE blocks.

Code for the browsers and SEs should manage fine.

tedster

11:38 pm on Oct 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got some examples in recent history where browsers made a perfect error recovery, but Google indexing did not. One of them was a missing "<"

Error recovery routines in visual browsers are a lot different than error recovery in a crawling and indexing program. I'd say code for a validator - and where your code doesn't validate, make sure that's an intentional choice.

g1smd

11:49 pm on Oct 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Tackling the specifics...

Every image needs an alt attribute. If the image is a part of the main content, then the text in that attribute should describe the image. If the image is just a spacer, or filler, you can use a minimum of

alt = " "
(remove the spaces when you put in on your site).

End tag for </a> which is not open. This happens when there is a nesting error, where you haven't closed things in the reverse order to which they were opened, or a tag is missing, or you used a block-level element inside an inline element.

Table not allowed here. This is a nesting problem. Either you have them in the wrong order, or a previous tag missing.

When you run the pages through the validator again, tick the box to enable "verbose" mode, so that the error messages will give you a longer explanation each time.