1442 Introduction to XHTML: Part 1 Appendix K (Professional web hosting)

1442 Introduction to XHTML: Part 1 Appendix K Fig. K.7 Fig. K.Fig.Fi K.7g. K.77Placing images in XHTML files. (Part 2 of 2.) Fig. K. Good Programming Practice K.5 Always include the width and the height of an image inside the tag. When the browser loads the XHTML file, it will know immediately from these attributes how much screen space to provide for the image and will lay out the page properly, even before it downloads the image. Performance Tip K.1 Including the width and height attributes in an tag will help the browser load and render pages faster. Common Programming Error K.4 Entering new dimensions for an image that change its inherent width-to-height ratio distorts the appearance of the image. For example, if your image is 200 pixels wide and 100 pixels high, you should ensure that any new dimensions have a 2:1 width-to-height ratio. Every imgelement in an XHTML document has an alt attribute. If a browser cannot render an image, the browser displays the alt attribute s value. A browser might not be able to render an image for several reasons. It might not support images as is the case with a text-based browser (i.e., a browser that can display only text) or the client may have disabled image viewing to reduce download time. Figure K.7 shows Internet Explorer rendering the alt attribute s value when a document references a nonexistent image file (jhtp.jpg). The alt attribute is important for creating accessible Web pages for users with disabilities, especially those with vision impairments and text-based browsers. Specialized software called speech synthesizers often are used by people with disabilities. These software applications speak the alt attribute s value so that the user knows what the browser is displaying. We discuss accessibility issues in detail in Chapter 24, Accessibility.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Leave a Reply