HTML and CSS Reference
In-Depth Information
12.1.1 HTML Review of Images
Before using images with JavaScript, the following section reviews the basics of using
images in a static Web page. Table 12.1 lists HTML image tags.
Table 12.1 HTML Image Tags
Tag
Attributes
Description
IMG
Starting tag for loading an image.
ALIGN
Floats the image either to the left or right side of the page, or aligns
the image with text in directions, texttop , top , middle , absmiddle ,
bottom , or absbottom .
ALT
Alternative text in case the image doesn't appear.
BORDER
The width in pixels of an image border.
HEIGHT
Height of the image in pixels.
HSPACE
Adds space, in pixels, to both the right and left sides of the image.
SRC
Contains the URL, location of the image relative to the document root
of the Web page.
VSPACE
Adds space, in pixels, to both the top and bottom of the image.
WIDTH
Width of the image in pixels.
MAP
Starting tag for an image map. Image maps link areas of an image with
a set of URLs. Clicking on an area of the map sends the user to that
page.
ID
The name of the image map.
NAME
Also the name of the image map.
AREA
Defines the clickable areas of the image map.
ALT
Describes what happens when the user clicks.
COORDS
Determines the shape of a rectangle, circle, or polygon in x , y pixel
coordinates.
HREF
The address of the page that will appear when the user clicks in a
particular area.
SHAPE
Assigned a type , where type represents the shape of the area.
 
 
Search WWH ::




Custom Search