There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Although it may be unwise, I'm trying to insert the image names as image alt attributes in web pages. I'm using HTML::Element, but can't seem to get it quite right. I think I know how to create a new tag but not how to creat a new attribute within say all img tags that don't have alt attributes. Here's what I have:
So how do I find all the images that don't have alt tags and insert the image file name (not the full path or extension) as the alt attribute? I thought of another possibility of using the nearest non-html content text as the alt tag "suggestion". If anybody has any ideas for other ways to automatically create the alt tag contents I'd be happy to hear. The dream way to make alt tags automatically (or at least have a temporary space filler) would be to hook into a semantic image search API and have the image identified some way. For instance possibly using this service: http://www.revimg.net/add.php. However for this to work, with a Google Goggles type program, the service would have to make correct identity guesses pretty accurately. In reply to Trying to Insert Alt Tags Programmatically by socrtwo
|
|