The top, middle, and bottom values align images inline with text. This one
is top-aligned and this one
middle-aligned. Since we
included no align attribute in this one
you can see that bottom is the default alignment.
It is often more useful to have text
flow around an image, rather than putting the image inline with text.
After all, that's how newspapers do it! That's precisely the effect caused by left and right
alignment. It certainly does create a better effect. But, notice how the text is right up against
the left aligned image. If you don't think it's cool to have text right up against the image,
some hspace and vspace around the image is in order. These attributes simply
add horizontal and vertical padding around the image. Please note that we're starting to have
to include a substantial amount of babble here to get the text to flow all the way around the
image
The border attribute can be used to give an image a thin
border or a thick
border.
The
alt attribute gives a textual description of the image. This was important in the
early days when computers and internet connections were sloooow, and some people would set
their browsers to "text only" so they could surf faster. Now, with cable and DSL connections,
pages full of images are no problem. Even with 56K phone modems, most people tolerate the
extra overhead incurred by graphics. However, the importance of alt is emerging again
since images are a drag on handheld internet devices. Note that we did not disable images on our
browser to show the alternate description. We simply supplied a bad URL so that the browser
couldn't find the image file. (When the browser asked for the image, the server software sent back
a packet indicating it could not find the image file. The browser resorted to the alternative.)
Finally, you can resize an image
proportionally or
disproportionately.