Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am trying to make it easier for search engines to crawl my website, as it is almost 100% dynamic.

I have a couple of transparent images which are actually links to sections of my page.

I wonder, if I add an "alt" attribute containing space characters to explain the target, will this improve SE rankings etc?

For example:

<img src="blabla.png" alt="post new classified">

Or will this just result in errors?

Ànd, what should I put in the alt attribute if I can't use space?

PS: Another different and short question, will javascript-rich content make a page less important to crawlers?

Thanks

share|improve this question
2  
Why would spaces in an alt tag result in errors anyways? –  Martin Jan 5 '11 at 13:43
2  
Why do you have transparent images that are links? How is the user supposed to know to click them? –  cHao Jan 5 '11 at 13:44
add comment

migrated from stackoverflow.com Jan 8 '11 at 14:22

This question came from our site for professional and enthusiast programmers.

7 Answers

The best sample you can extract for ALT attribute is here:

http://dev.w3.org/html5/spec-author-view/embedded-content-1.html#alt-10

Make a favor, open you webpage with Lynx, W3M, or Links. Then disable image loading on Firefox/Chrome/Opera and see your page too. You will notice how alt works and will have a better idea on how handle with.

Crawlers and Image crawlers take alt as a textual representation of images, figures, buttons, and so on. Just treat them as a piece of text embed into your context, make them useful and users will thank you - as well as search engines.

That said, let's go specifically to your question:

Check here:

http://dev.w3.org/html5/spec-author-view/embedded-content-1.html#alt-9

As you can see, there is no problem using alt with spaces. Just write alt as you would write the anchor text and everything should be fine.

Going further, remember you also have the title attirbute, which is not directly SEO related, but counts with keyword density and is the proper way for giving users tooltips, which is good for accessibility and usability.

About javascript, install noscript addon on Firefox and access you site, and/or use a text browser. That's the shortest way to check how your page and measures get crawled.

share|improve this answer
add comment

alt is not for search engines. alt is for text-to-speech browsers.

share|improve this answer
4  
Alt is for anything that doesn't display an image, including browsers with images turned off to save bandwdith, screen readers, braille displays, text browsers, browsers with images turned on which fail to download an image (e.g. because of a network time out), etc, etc, etc. The point is the same (write for people, not search engines), but the scope is much wider. –  Quentin Jan 5 '11 at 13:45
    
All true. However I think screen readers will have the hardest time with postNewClassified or something like that, that's why I always write my 'alt's thinking about this specific area ;) –  Mchl Jan 5 '11 at 13:51
add comment

You should use spaces, as screen readers will not be able to understand the tag otherwise.

Most modern browsers also use these as "tool tips" when hovering over images (if a title attribute is missing) - so, even on this count you should use proper grammar.

In general alt is an alternative representation of the image, mostly in case the image can't be seen (if it is missing, text based browser, a network error when retrieving the image or any other reason).

share|improve this answer
add comment

The alt attribute is required, and it should be human readable text. It's not intended for search engines; it's for people who use screen-readers to browse the Web (i.e., blind or otherwise visually impaired people) or people who turn off images for other reasons (i.e., to speed up page loading). So spaces are a good idea.

Edit: To answer your "PS," search engines won't dock points specifically for using Javascript, but if most of your page is display: none and you use JavaScript to un-hide it, search engines will probably ignore those sections. If search engines determine that you're trying to load keywords into hidden sections (or transparent links?), they might block your site completely. To over-simplify things a bit, you can think of web crawlers as blind visitors with no Javascript.

share|improve this answer
add comment

I have no clue if using the alt attribute will benefit SEO. Last time I checked, most on-site optimizations added only very little to it, compared to outside linkage. I guess it also depends on the algorithm used by the respective search engine you are asking.

However, using the alt tag is a priority 1 item in the

Provide a text equivalent for every non-text element (e.g., via "alt", "longdesc", or in element content). This includes: images, graphical representations of text (including symbols), image map regions, animations (e.g., animated GIFs), applets and programmatic objects, ASCII art, frames, scripts, images used as list bullets, spacers, graphical buttons, sounds (played with or without user interaction), stand-alone audio files, audio tracks of video, and video. [Priority 1]

and still applies in WCAG 2.0., too.


In addition, the alt attribute is a required attribute in HTML4 and defined as

alt = text [CS]
For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute.

Several non-textual elements (IMG, AREA, APPLET, and INPUT) let authors specify alternate text to serve as content when the element cannot be rendered normally. Specifying alternate text assists users without graphic display terminals, users whose browsers don't support forms, visually impaired users, those who use speech synthesizers, those who have configured their graphical user agents not to display images, etc.

The alt attribute must be specified for the IMG and AREA elements

It's also required in HTML5 and XHTML flavors.

share|improve this answer
add comment

The alt tag is used for people who are handicapped in some way that makes it hard / impossible to see text.

Although the alt tag is not meant for search engines it may very well boost your SEO, since it is the proper way to code it.

share|improve this answer
add comment
  1. the alt-attribute is for screenreaders. (alt = alternative)
  2. search engines take some keywords out of it for the image search
share|improve this answer
    
Search engines, in essence, have to treat a page as a screenreader would. –  ceejayoz Jan 5 '11 at 13:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.