How to use CSS to make the Image Alt tag Google friendly and people friendly
How to use CSS to make your Image Alt tags more people friendly
- Is there any way to make the text within the image Alt tag look more appealing to site visitors when an image is pre-loading or just fails to load for whatever reason.
Answer: Our tech guys thought that was an intriguing question with appealing possibilities, so they went looking for some way to do just what you described and here's what they came up with.
By placing the image within a <div> tag, it's possible to format the text that is located within the image alt tag. Here's a look at the code:
<div style='font-family:comic sans MS; color:red; font-size: 1.2em; line-height:1.2em; padding-bottom:30px; width:600px; padding-left:10px;'>
<img src="//d1tbpd1hx2blcp.cloudfront.net/images/DogAteIt_600x130.png" width="600" height="130" alt="*Guarantee -- We promise you'll get *more* than your money's worth. If not, cancel anytime -- even if it's the last day of your subscription ... just tell us *The dog ate it* ... You'll get a cheerful refund, and *thanks* for trying us out!" border="0" style='margin-left:-7px; margin-right:0px; margin-top:5px;' />
Of course, we would prefer to simply display the image as it is seen below: