Here is a review of the IMG element's attributes we covered and
possible values:
- SRC="URL of Graphic File"
- This tells the browser where to look for the graphic file.
- SRC is required.
- You can review URLs if necessary.
- ALT="Text to Replace/Describe Graphic"
- This relays information to readers who can't or don't want to see graphics.
- ALT is required by the District. It is also required in HTML 4.0.
- WIDTH="n" and HEIGHT="n"
- These values tell a browser how much space to set aside for a graphic, thereby
speeding up page rendering.
- "n" is an integer, equal to how many pixels wide and high a graphic is.
- These attributes are optional, but useful for large graphics and
graphics in tables.
- ALIGN="TOP", "BOTTOM", "MIDDLE", "LEFT" or "RIGHT"
- TOP, BOTTOM and MIDDLE align the graphic to the surrounding line of text.
- LEFT and RIGHT align the graphic to the page, allowing text to flow around it.
<BR CLEAR="X">, where X equals LEFT, RIGHT or ALL, is used to
place text below a graphic which is aligned to the right or left.
- ALIGN is optional.
- BORDER="n"
- n is the width in pixels that the border should be.
- To "turn off" the border around a linked image, n should be 0.
- BORDER is optional.
- VSPACE="n" and HSPACE="n"
- n is the number of pixels that should be used to pad a graphic, either vertically
(VSPACE) or horizontally (HSPACE).
- VSPACE and HSPACE are optional.
Previous: Thumbnails