HTML and CSS Reference
In-Depth Information
Here we are, on day 17 of the tour, in the kumquat
packing plant:
<img src="pics/packing_plant.gif"
alt="[Image of our tour group outside the main packing plant]">
What an exciting moment, to see the boxes of fruit moving
According to the HTML 4.01 specification, the alt attribute is required
for all <img> tags. To be truly compliant, include empty alt attributes
( alt="" ) with all your images.
The longdesc attribute is similar to the alt attribute but allows for longer
descriptions. The value of longdesc is the URL of a document containing
a description of the image. If you have a description longer than 1,024
characters, use the longdesc attribute to link to it. Neither HTML 4 nor
XHTML specifies what the content of the description must be, and no
browsers currently implement longdesc ; all bets are off when deciding
how to create those long descriptions. The align attribute
The standards don't define a default alignment for images with respect
to other text and images in the same line of text: you can't always pre-
dict how the text and images will look. [*] HTML images normally appear
in line with a single line of text. Common print media such as magazines
wrap text around images, with several lines next to and abutting the
image, not just a single line.
[*] Most of the popular graphical browsers insert an image so that its base aligns with the baseline of
the textthe same alignment specified by the attribute value of bottom . But document designers should
assume that alignment varies among browsers and should always include the desired type of image
Fortunately, document designers also can exert some control over the
alignment of images with the surrounding text through the align at-
Search WWH ::

Custom Search