Web and email hosting - Appendix L Introduction to XHTML: Part 2 1459

Appendix L Introduction to XHTML: Part 2 1459 66 67 68 Table border Table header Table footer Table body Fig. L.1 Fig. L.Fig..Fi L1g. L.1L.1XHTML table. (Part 3 of 3.) Fig. Tables are defined with the table element. Lines 16 18 specify the start tag for a table element that has several attributes. The border attribute specifies the table s border width in pixels. To create a table without a border, set border to “0″. This example assigns attribute width “40%”, to set the table s width to 40 percent of the browser s width. A developer can also set attribute widthto a specified number of pixels. Testing and Debugging Tip L.1 Try resizing the browser window to see how the width of the window affects the width of the table. As its name implies, attribute summary (line 17) describes the table s contents. Speech devices use this attribute to make the table more accessible to users with visual impairments. The caption element (line 22) describes the table s content and helps textbased browsers interpret the table data. Text inside the
tag is rendered above the table by most browsers. Attribute summary and element caption are two of many XHTML features that make Web pages more accessible to users with disabilities. We discuss accessibility programming in detail in Chapter 24, Accessibility. A table has three distinct sections head, body and foot. The head section (or header cell) is defined with a thead element (lines 26 31), which contains header information, such as column names. Each tr element (lines 27 30) defines an individual table row. The columns in the head section are defined with th elements. Most browsers center text formatted by th(table header column) elements and display it in bold. Table header elements are nested inside table row elements. The body section, or table body, contains the table s primary data. The table body (lines 34 54) is defined in a tbodyelement. Data cells contain individual pieces of data and are defined with td(table data) elements.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply