Forum Moderators: Robert Charlton & goodroi
For example, it is complaining about align=absmiddle for img tags. Without this, my site looks off in IE. Will leaving this trip up Google, etc.? What about not having an alt tag on every image?
Shouldn't a good parser handle these without a hitch? Thanks.
The alt-tag is only relevant for Google if the image is within a hyperlink: in that case it is seen as a replacement for the anchor text. Disclaimer: no one but G knows for sure how much weight alt-text gets.
no semantic value for, say, accessibilitythats exactly what i mean. screen readers, and people who have images turned off
I think the poster was refering to you putting an empty string in the alt tag. That has no use to a screen reader.
Truth is, it depends on what version of HTML you are using.
If you're using 3.2 then you shouldn't put an empty alt attribute in your code if your image doesn't convey any information (eg. a blank 1x1 gif used for user tracking).
If you're using HTML4.01 or XHTML1.0 or 1.1 then you should give all alt tags an attribute.
The reason is, that in theory it will make parsers quicker. If an HTML parser knows that it is dealing with valid HTML that complies with the standards, then it doesn't need to spend extra processing power trying to work out whether you have used an alt tag or not. Because HTML4.01 requires you to have an alt attribute, it knows that one will be there.
This is all theoretical. Most parsers will check anyway because there are so many invalid documents about. However this is likely to change as more people start using browsers that support XHTML (at the moment, IE does not). You should get in to the habit now.
However, most web sites can be put together using HTML 3.2, so if you're using HTML3.2, there's no need to put alt attributes for images that convey no meaning.
[edited by: mrMister at 12:03 pm (utc) on May 13, 2005]
If you have a number of decorativce images on a page, is it better to hear: 'image image image image image image ', or just have those non-informational images ignored, and get straight to the content?
<rant>please, can we get the terminology right. there is no such thing as an alt tag, its an attribute. Pedantic, maybe, but this is supposed to be professional level discussion, and basic terminology such as this should be a no-brainer</rant>
[edited by: benihana at 12:10 pm (utc) on May 13, 2005]
I prefer to use the original poster's terminology to reduce the risk of confusion.
in which part of your post, as you seem to mix and match?
ALT is not a tag, and to avoid confusion we should use the correct terminology, as is fitting to a professional discussion, which:
you should give all alt tags an attribute
is obviously an issue for you.
[edited by: lawman at 3:34 pm (utc) on May 13, 2005]
It's also a benefit for accessibility purposes including screen readers.
AFAIK, Google won't have any problems parsing an HTML document that doesn't have alt attributes on all the images.
[edited by: lawman at 3:37 pm (utc) on May 13, 2005]
That may change, of course.
In any event, it's a process of good design and useability that dictates that ideally your pages should validate.
TJ
I've validating my page with the W3C validation tool. I'm wondering if there are "acceptable" errors.
imho, there are no "acceptable" errors. though as already pointed out, for reasons other than google.
For example, it is complaining about align=absmiddle for img tags.
Depending on dtd you're using, absmiddle may be deprecated, for example:
HTML 4.01 Transitional:
value of attribute "ALIGN" cannot be "ABSMIDDLE"; must be one of "TOP", "MIDDLE", "BOTTOM", "LEFT", "RIGHT"
Will leaving this trip up Google, etc.?
probably not, but again, there are other reasons for not using it, cross platform/browser/version readability.
. . . Without this, my site looks off in IE.
can you try something along the lines of css: vertical-align:middle instead? as in this spec:
[w3.org...]
What about not having an alt tag on every image?
should be included, at least alt="*", not alt=""
Since we can't include private url's here, try googling:
"Use of ALT texts in IMGs" (in quotes) and check the 1st or 3rd entry. Take a look at the "howlers" at the end of the intro. (not my sites)
I'm not even going to get into the "it's a tag, no its an attribute" argument. And at this point it's probably time to move this over to an html/css forum.
Thanks for the thoughtful answer. I usually agree with "there are no acceptable errors," but sometimes an error isn't really an error.
RE: absmiddle
vertical-align seems to have its own compatibility issues. I will find what fits best. I'll choose the user experience over 100% validation if the SEs won't choke.
Thanks for the insight everyone. Have fun with the squabbling!
1) Missing or invalid attributes
Examples of this category are: missing
alt attributes, depreciated, invalid or non-standard attributes such bordercolorlight or leftmargin. Such errors are very unlikely to cause problems with crawlability. Googlebot doesn't care about border colors, page margins or image alignment. A missing
alt attribute might have an accessibility impact but it won't affect the parsing of the page by a spider. This doesn't mean you shouldn't fix them, but do it for other reasons, not for Googlebot. Same goes for a missing doctype. 2) Nesting errors
Example:
<b><p>text</b></p> or similar. Depending on the type or severity, you might cause problems, including the splitting of snetences and the disassociation of text chunks. Again it shouldn't affect pure crawlability, but it can theoretically harm ranking. 3) Parsing errors
Example:
<span="whatever"your text here</span> or other missing tags or brackets. This offers the most serious challenge to a parser, and can cause serious crawlability problems for spiders. They may not be page-breakers in modern browsers which cope well with severely broken markup (they have great recovery handling, IE in particular) but can make a simpler parser such as a spider choke and fail to read the page. A missing </head> can be fatal, for example. These problems should be fixed immediately.
For example, it is complaining about align=absmiddle for img tags. Without this, my site looks off in IE. Will leaving this trip up Google, etc.? What about not having an alt tag on every image?
Try 'poodle predictor' on your site, it will show how the googlebot likely handles those errors.
you also may be surprised by some other errors that actually validate.
the alt attribute is a perfect hole to plug a keyword or 2 into so I would use the opportunity unless it would be pointless to put anything (a navbar background or something)
Let's get this terminology right. The alt attribute is required on the <img> tag. The minimum allowed for the attribute value is "" (i.e. empty).
Use an empty attribute value on spacers and page decoration. You only need to fill the text in for content images and navigation buttons.
.
Whether something is a tag or an attribute is important; otherwise you will be left behind when the discussion moves on to <title> tags and title attributes.