|
Adding
an image to your web page is not hard. To add an image, use:
<img src="image">
The image will appear where you put the tag.
Replace image with the image file, with it's
extension. For example:
<img src="me.gif">
will display the image called me.gif in the same
directory as the HTML file. If it is not, add
directory information like this:
<img src="images/me.gif">
This tag will display an image called me.gif,
which is in a directory below the HTML page
called images.
Adding
a text alternative is useful for those who do not
have images enabled on their browser. In some
browsers, a pop-up box appears if you hold the
cursoe over the image. This displays the text
alternative.
To do this, add alt="alternative"
in the tag like this:
<img src="me.gif"
alt="A picture of me">
The
next thing to do is to decide where text should
go in relation to the image. To do this, add align="alignment"
to the tag. These are valid alignments, with
examples:
This
image - - uses "bottom"
alignment.
This
image - - uses "middle"
alignment.
This
image - - uses "top"
alignment.
This
image - - uses "absbottom"
alignment.
This
image - - uses "absmiddle"
alignment.
This
image - - uses "texttop"
alignment.
This
image - - uses "baseline"
alignment.
Two other vaild
alignments are "left"
and "right". These let
the text flow around on the right
or left. The example on the left uses "left",
and the one on the right uses "right".
These work best when put into a text flow. .
Don't forget that you only need one pair of
quotes for any tags. The tag is not align=""texttop""
or similar - it is align="texttop".
The
last parameters you may want to add are width="n"
and height="n". These
define the width and height in pixels. The whole
tag could look like this:
<img
src="me.gif" alt="A picture of
me" align="middle"
width="250" height="300">
|