Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^134) Chapter 4 Visual Elements and Graphics
WWW
Focus on Accessibility
technology (including Web sites) associated with the federal government. The alt
attribute configures an alternative text description of the image. This alttext is used by
the browser in two ways. The browser will show the alttext in the image area before
the graphic is downloaded and displayed. Some browsers will also show the alttext as
a tool tip whenever the Web page visitor places a mouse over the image area. Applications
such as screen readers will read the text in the altattribute out loud.
Standard browsers such as Internet Explorer and Safari are not the only type of applica-
tion or user agent that can access your Web site. Major search engines run programs
called spiders or robots; these programs index and categorize Web sites. They cannot
process images, but some process the value of the altattributes in image tags.
The longdescattributeis used to provide accessibility when the alttext description is
too short to convey the meaning of the image. The value of the longdescattribute is
the URL of a Web page that contains a detailed text description and explanation of the
image. Most current browsers do not support this attribute but you can expect
expanded support in the future.
Legacy Alert.The align, vspace, and hspaceattributes help position the image on
the page relative to text. Examples of formatting images and text using vertical align-
ment properties are shown in Figure 4.14.
Figure 4.15 provides examples of horizontal alignments, the hspaceattribute, and the
vspaceattribute. The hspaceand vspaceattributes are used to add space around an
image symmetrically.
Since you’ll find many pages on the Web coded using the deprecated attributes of the
image element (align, hspace, vspace, border), it’s a good idea to become familiar
with them. CSS techniques that replicate the functionality of these attributes will be
discussed in Chapter 6.
Figure 4.14
Examples of vertical alignment
Figure 4.15
Examples of horizontal alignment

Free download pdf