Web Design Forum: How to deal with "alt" in images made with Div? - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to deal with "alt" in images made with Div? My images are <div> tags only

#1 User is online   Reverie 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 36
  • Joined: 05-May 11
  • Reputation: 1

Posted 05 December 2011 - 08:33 PM

Hi,

I read always that the "alt" of the images are very important, specially when they are linking to somewhere, cause this "alt" can work as an anchor text.

But my site has images made with div tags, like <a href="link.."><div id="suchimage"></div></a>

Is there a way for me to accomplish "alt" information for those images and menus, or should I put the images in other way, not by the div tag?

Thank you.
0

#2 User is online   roothost 

  • Currently accepting new clients
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,463
  • Joined: 06-February 11
  • Reputation: 73
  • Gender:Male
  • Location:Lewes, East Sussex
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 05 December 2011 - 08:45 PM

View PostReverie, on 05 December 2011 - 08:33 PM, said:

Hi,

I read always that the "alt" of the images are very important, specially when they are linking to somewhere, cause this "alt" can work as an anchor text.

But my site has images made with div tags, like <a href="link.."><div id="suchimage"></div></a>

Is there a way for me to accomplish "alt" information for those images and menus, or should I put the images in other way, not by the div tag?

Thank you.

Erm, there is no img tag in the above code? Where are you supposing to put the image?
0

#3 User is online   Reverie 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 36
  • Joined: 05-May 11
  • Reputation: 1

Posted 05 December 2011 - 08:49 PM

The image goes as the "background-image" of the div, in the css file.

Like #suchimage {background:... }

I find no room for the "alt" :(
0

#4 User is online   roothost 

  • Currently accepting new clients
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,463
  • Joined: 06-February 11
  • Reputation: 73
  • Gender:Male
  • Location:Lewes, East Sussex
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 05 December 2011 - 08:52 PM

View PostReverie, on 05 December 2011 - 08:49 PM, said:

The image goes as the "background-image" of the div, in the css file.

Like #suchimage {background:... }

I find no room for the "alt" :(

Then it isn't classed as an image per se, and requires no alt tag. I think you maybe getting confused with title, as in;
<a href ="http://www.mylink.com" title="my link title">my link </a>

Which will give a nice hover title when hovered over a link.
0

#5 User is online   Reverie 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 36
  • Joined: 05-May 11
  • Reputation: 1

Posted 05 December 2011 - 09:20 PM

Thanks. Specifying better my doubt: It helps for seo if the anchor text of my link has a keyword. Like <a href=".."> keyword </a>
If the link is an image, I believed the "alt" could work in the same way. Or it doesnt?

Using a "title" in the <a> that is a keyword helps for seo?
0

#6 User is online   roothost 

  • Currently accepting new clients
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,463
  • Joined: 06-February 11
  • Reputation: 73
  • Gender:Male
  • Location:Lewes, East Sussex
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 05 December 2011 - 09:29 PM

View PostReverie, on 05 December 2011 - 09:20 PM, said:

Thanks. Specifying better my doubt: It helps for seo if the anchor text of my link has a keyword. Like <a href=".."> keyword </a>
If the link is an image, I believed the "alt" could work in the same way. Or it doesnt?

Using a "title" in the <a> that is a keyword helps for seo?

The ALT tag is supposed to be used to describe an image should the browser not show it, or be read by a screen reader. For example, if it is a picture of a man walking a dog, then really the ALT tag should be something like "man walking a dog". It isn't really supposed to be used for SEO purposes and abuse of the ALT tag by keyword stuffing could potentially harm your site.

Saying that, it doesn't hurt to have a well placed keyword IF it is relevant and descriptive.

I have always found the use of the title tag in links helpful, not just for SEO, but visually as well. Sometimes you just have to use a "read more" or "here" anchor text (I try not to!) and by accompanying that with a descriptive title gives the end user a bit more info and what that link will actually open up.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users