|
Chapter 5 REPUBLIC OF NICARAGUA
|
|
1. Name three print-based design structures that Web designers can duplicate with tables. Columnar layouts, align text, add white space, and structure pages 2. What are the three basic table elements? XHTML <table> element contains the table information, which consists of table row elements <tr> and individual table data cells <td> 3. What table element presents its content as bold and centered? The <th> element 4. What attribute can you use with the <caption> element? The <caption> tag lets you add a caption to the top or bottom of the table. You can use the align="bottom" attribute to place the caption at the bottom of the table. 5. What are the three levels of table structure? Global, row level, or cell level 6. What attribute would you use to adjust spacing between table cells? cellspacing 7. What attribute would you use to adjust spacing within table cells? cellpadding 8. In the following code, which attribute takes precedence? <tr valign="top"><td valign="middle">Cell 1</td><td>Cell 2</td></tr> valign=“middle” in the td tag 9. What elements let you apply styles to table columns? col 10. What value should colspan equal in the following code?
<tr><td>R1C1</td><td>R1C2</td><td>R1C3</td></tr> 4 11. Write the code for a table that fills 75% of the browser window. <table border width="750"> <tr><td colspan="4" align="center">Page Banner</td></tr> <tr><td rowspan="2" width="25%">Nav Links</td><td colspan="2">Feature Article</td><td rowspan="2" width= "25%">Linked Ads</td></tr> <tr><td rowspan="2" width="25%">Description</td><td <tr><td>R3C2</td><td>R3C3</td></tr> </table>
12. What is the major disadvantage of relative-width tables? Use relative widths if you want to build tables that resize with the browser window, wrapping your content to fit. 13. Write the code to remove the default spacing from a table. <table border="0" cellpadding="0" cellspacing="0"> 14. Why would you want to remove the default spacing from a table? Doing so lets you join the contents of adjacent cells. You can take an image, break it into separate pieces, and then rejoin the pieces in a table by removing the default spacing. 15. How do extra character spaces affect a table? Provide built-in white space between them, so that the contents of adjoining cells do not run together. 16. What is the best way to center a table? Use the <div> element, with the align="center" attribute to set the table alignment. Centering a fixed table makes it independent of resolution changes, because the table is always centered in the browser window. 17. What are the benefits of stacking tables? Browsers must read the entire table code before displaying the table. Any text outside of a table is displayed first. If you build long tables, they increase the time the user has to wait before the tables appear in the browser. Because of the way browsers display tables, it is better to build several small tables rather than one large one. 18. What are two rules for setting column widths in a table? You can set column widths by using the width attribute at the cell level. Column widths must be set in only one cell per column. Setting the column widths ensures that the text wraps properly without skewing the evenly distributed four-column layout. 19. What attribute lets you align content to the top of a cell? valign attribute set to top 20. What is the difference between removing the border attribute and setting border="0"? Table uses the default spacing even if it is not specified, whereas explicitly setting the border to 0 means there is no border
|
|
|