Jump to content
Killersites Forums

Beginners Web Design


Recommended Posts

Hey Everybody! I'm doing Web Design 1 and I'm trying to get the alt attribute to work on my image, but it's just not working. When I put the pointer on the image, I don't get any text at all. I checked the code and it seems like I've done everything as per the video, the only thing I changed was that I used a .png file instead of a .gif file. Any suggestions??





Link to comment
Share on other sites

That makes sense, though in the video he doesn't mention anything about a title attribute and it seems to work for him. Either way, I am guessing that I just write in;


title="text here"


or is there some kind of abbreviation for the title attribute?


Thanks for the quick reply. I appreciate it!

Link to comment
Share on other sites

Yes, the alt tag should always be used - it's part of standard-compliant code. It needs to describe the image for those who cannot see it - for whatever reason. If the image is purely decorative and does not contribute to the content, the alt tag is still required, but it can be left empty. As in so:


The title tag is optional.

Link to comment
Share on other sites

Most people consider Micro$oft wrong.


The alt attribute is an ALTernate for the image when blind users use the site or images are blocked for some reason, like many cell phone users to save bandwidth and be faster.


You describe the image, if for instance it is my daughter with Gov. Parnell that is what I write. If it is maybe a nice picture of a building, you can say "The glacier Visitor Center glowing under outside lights in heavy fog." Of course you have to ask yourself if the photo is important? If I am writing about the glacier then it is more decorative and can have an empty alt attribute, if I am talking about the building then I would leave it described.


If you do not do this, those users such as blind users will wonder what they are missing and a screen reader will read the name of the image instead, im17_2010.jpg is useless and irritating for them.


As for decorations, who cares if it is the top left hand corner squiggly design. The empty alt will cause the image to be basically ignored by a screen reader.


Back to the IE team, they chose to take the standards and in there interpretation, have the alt attribute appear like a title attribute. ALL other browsers took the common interpretation that as alternate text, it should only appear when the image is not shown. If it is alternate to the image, why would you show both?


Also keep in mind it is a quick text. There is a "longdesc" (Long Description) attribute that links the image to another document with a longer description, say for a Pie chart of expenses. Most however figure that id the description is to long for the alt attribute, then it should be in the content anyways, so it is not often used.


Lastly, under titles. Do not use under titles & alt. If you have a photo of yourself with an under title of your name and do the same with your alt attribute... then a screen reader will read both, in my case Image Kyle Lamson Kyle Lamson.


You must always have the alt attribute on every image, but you do not always have to fill it in unless it carries important info for the user.

Link to comment
Share on other sites

  • 4 weeks later...

Agree with Angela. If you want to hover you need to add in title but remember having keywords in your alt tag will help with the on page SEO so I normally use both.


Say my keyword I want to rank for is click the code would look something like this?


<p><img src="images/stories/clock.jpg" border="0" alt="Clock - Tick Toc" title="Clock" /></p>

Link to comment
Share on other sites

Yes that is one way to misuse the alt attribute.


It is for alternative user agents, not SEO. If it is just a image of a clock, then ideally it should be left blank as it is of no particular importance to the user as you describe it here.


You should really use the tags for what they are meant for, in this case people with disabilities or other forms of user agents.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...