In our last tutorial we discussed working with forms in HTML. In this episode we will cover how to work with images, such as floating images, image maps, and background images.
HTML Working with Images - Alternatives to Images (Page 2 of 4 )
Sometimes, for whatever reason, an image may not appear on a page. Maybe it wasn't linked properly or maybe you forgot to upload the image to the server. Or maybe the the link you put in the src attribute is no longer there; who knows what crazy thing you did. Normally the visitor will just see a large red x in lieu of the image you intended. You can, however, choose to display some text if your image is not there (or even if the image is there; if the image does work, whenever the user hovers over the image, a tool-tip with text will appear), like so:
<html>
<body>
<p>
Here is a sample image:
<img src="sample.gif"
width="144" height="50" alt=”Here is a sample image”>
</p>
<p>
Here is the same image, only bigger:
<img src="sample.gif"
width="288" height="100" alt=”Here is an example of the same image, only larger”>
</p>
<p>
Here is the same image, only smaller:
<img src="sample.gif"
width="77" height="50" alt=”Here is yet another example of the same image only smaller”>
</p>
</body>
</html>
Aligning Images
You can determine where your image appears within text by using the align attribute: