Joined: 17 Sep 2007 Posts: 13 Location: Near Colchester in the UK
Posted: Tue Dec 11, 2007 12:08 pm Creating img title tags from the img alt tag
Hi
I have lots of pages with image links that include the 'alt' tag. To display tool tips correctly also need the img 'title' tag which in content terms is identical to the alt tag.
For example <img src="photo.gif" width="100" height="50" title="Title of Photo" alt="Title of Photo" /></a>
Has anyone found a neat tool to go through html pages and add a 'title' tag, whenever it finds an 'alt' tag, i.e. essentially duplicates the 'alt' tag.
To do this by manually editing the html takes hours!
To display tool tips correctly also need the img 'title' tag which in content terms is identical to the alt tag.
Incorrect. The title tag will display a tooltip(as will the alt tag) however the alt tag is a requirement for accessibility for visually impaired persons using screen readers to display alternate text in the absence of images, the title tag will not display this text. However you can use both tags to achive your purpose.
Joined: 17 Sep 2007 Posts: 13 Location: Near Colchester in the UK
Posted: Wed Dec 12, 2007 12:21 am
Hi
Yes I am aware of the role of the tags, but I am looking for a way of creating title tags 'automatically' by copying the 'alt' tags as the content of the tags will be the same.
Problem is that Firefox only displays tool tips from the title tag, not the alt tag.
The alt tag is actually incorrectly used by IE to display tool tips, it is intended only to cause a text display when images are disabled.
This is just to save going through the code manually and typing in the title tag on every image (I have hundreds to deal with).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum