Alternative Text for Images
Another tip for image coding in HTML is alternative text. This text shows up in case the graphic does not show up, and also is displayed when the user holds their mouse over an image. Take the Google logo, for example. If I want to display, "This website rocks!" when you hold your mouse over the image, or if it doesn't load, I will use this code:
<IMG SRC="http://www.google.com/images/logo.gif" ALT="This website rocks!">
This gives me this result (drag your mouse over it and hold it still for a few seconds):
The alternative text will also show up when the graphic isn't coded correctly like this:
<IMG SRC="http://www.google.com/images/logoarughaj.gif" ALT="This website rocks!">
That bad code gives me this:
As you can see, alternative text is very handy and a good way to manage images.
Also, if you can't get an image to come up, make sure you have http:// written at the beginning, not just www.!
NOTE FROM NILS: Some of the information shown above may not work on some browsers exactly as described. The information above is accurate for Internet Explorer, however.
<IMG SRC="http://www.google.com/images/logo.gif" ALT="This website rocks!">
This gives me this result (drag your mouse over it and hold it still for a few seconds):
The alternative text will also show up when the graphic isn't coded correctly like this:
<IMG SRC="http://www.google.com/images/logoarughaj.gif" ALT="This website rocks!">
That bad code gives me this:
As you can see, alternative text is very handy and a good way to manage images.
Also, if you can't get an image to come up, make sure you have http:// written at the beginning, not just www.!
NOTE FROM NILS: Some of the information shown above may not work on some browsers exactly as described. The information above is accurate for Internet Explorer, however.
1 Comments:
This comment has been removed by the author.
By Wolffie, at December 14, 2016
Post a Comment
<< Home