Reminder |
Remember to book mark
this site! |
|
HTML stands for HyperText Markup Language
Part 5: Image Attributes
There are main attributes we can add to the image tag which describe or
alter the appearance of the image.
- ALIGN
One we already touched on is the align tag. When used with the image it
allows the image to be oriented in some horizontal location on the page in
relationship to the text, or with slight vertical adjustments. Typical
align values are right, center, left, top, middle.
- WIDTH
The width tag will tell the browser how wide to display the image. This
will set the placeholder for hte image as it loads, and/or can be used to
adjust the size the image is displayed at on your page.
The numbers we use for width are pixels. For comparison, most monitors are
800 pixels across and 600 down. You can also use percentages, where 100%
would be full width.
- USAGE
In the code below, align and width tags have been added to the image as
attributes of the image in the code.
Let's go over a few codes
- height - the height of the image
- width - the width of the image
- align - the horizontal alignment of the image
- top----------aligns the text with the top of the picture
- bottom-------aligns text with bottom of picture
- middle-------aligns the text with the middle of the image
- right--------aligns image at right margin, and text will wrap on
the left side of it
- left---------aligns picture at the left margin, and text will
wrap on the right of it
- hspace should be the amount of space you want on the sides
your picture in pixels
- vspace should be the amount of space you want on the top
and bottom of your picture in pixels
Let's put some more of this into our code
Save your html and view it
Once again, code does not have to be memorized, you will become more
familiar with it as you use it.
There are two more codes regarding images
- ALT
The alternate attribute is Alt="" such as
<img src="http://www.porshiana.com/waterimage.jpg" alt="island">
This code is used to display the word "island" should your picture not
show up for some reason. This works out well for people who are visually
impared or use text only browsers.
- BORDER
The other code is border="number". This border code is used when you link
the picture to a page, as we will learn to do in the next lesson. It can
be used to add the border around an image that is unlinked too.
When you are ready we can move on to
lesson 6,
links.
|
"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2024 All Rights Reserved
Privacy
and Legal
|
|
|