Alt tag/text (Full Version)

All Forums >> [Web Design] >> Web Graphics



Message


DaveX -> Alt tag/text (4/7/2007 13:40:06)

If I'm wanting to put text with an image for better accessibility, is it 'alt text' or an 'alt tag'? Also, does it actually help in regards to search engines? I see conflicting info on that. Also, is the info put into the image in, say, Photoshop or is it put into the html?




womble -> RE: Alt tag/text (4/7/2007 15:14:19)

It's often incorrectly called an Alt tag, but it's actually an alt attribute. The alt attribute goes in the HTML, so your image's HTML would look something like, <img src="myimage.jpg" height="100" width="100" alt="My image" />.

Search engines do use alt text to a certain extent, but not as much as they used to due to over-use of them and people stuffing keywords in them. The alt text should be meaningful, so for example if your image was of a vase of flowers, your alt text would be something like alt="vase of flowers", or if it's text as an image, it should be the text in the image, for example, alt="Welcome to our website". If an image is there for purely decorative purposes though, the alt attribute should be empty, e.g. alt=""




DaveX -> RE: Alt tag/text (4/7/2007 15:52:34)

So, what if I have a site with 1000s of pictures in a database? Each page is populated with the db so how would I put the info in?




jaybee -> RE: Alt tag/text (4/7/2007 17:04:55)

Presumably the database holds a description of the image. If it puts that on the page as in a gallery you should be OK setting the alt attribute to "" otherwise you could populate the alt with the description but that seems pointless if the description is already on the page.

It really depends on how you're displaying the images and how you generate them.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.492188E-02