• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Workshop

Quiz

1:You want a Web page with two columns of text side by side. How do you create it?
A1: With the following table:
<table><tr><td align="top">
...First column of text goes here...
</td><td align="top">
...Second column of text goes here...
</td></tr></table>

2:You think the columns you created for question 1 look too close together. How do you add 30 pixels of space between them?
A2: Add cellspacing=30 to the <table> tag. (Alternatively, you could use cellpadding=15 to add 15 pixels of space inside the edge of each column.)
3:Write the HTML to create the table shown in the following figure:

A3:
<table border="5">

<tr>
 <td rowspan="3">A</td>
 <td colspan="3">B</td>
</tr>
<tr>
 <td>E</td>
 <td>F</td>
 <td rowspan="2">C</td>
</tr>
<tr>
 <td colspan="2">D</td>
</tr>
</table>

Exercises

  • You can use a simple one-celled table with a border to draw a rectangle around any section of text on a Web page. By nesting that single-cell table in another two-column table, you can put a sidebar of text to the left or right side of your Web page. Outlined sections of text and sidebars are very common on printed paper pages, so you'll probably find uses for them on your Web pages, too.

  • Do you have any pages where different visitors might be interested in different information? Use a table to present two or three columns of text, each with its own heading (and perhaps its own graphic). That way, something of interest to everyone will be visible at the top of the page when it first appears.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint