In order to emulate the structure of the iTunes
playlist, set the table??™s width to a percentage value. This means the table will
stretch with the browser window. As explained earlier, you should also use the
summary attribute to succinctly detail what the table??™s all about.
?? summary="Music selected by Craig Grannell, with details of song,
?? playing time, artist, album and play count.">
Strictly speaking, the border attribute should be omitted. However, prior to adding
CSS rules, it??™s a handy way to more prominently show the table??™s structure in a
browser. Note also the use of cellspacing??”without this, most browsers place gaps
between the table cells of unstyled tables.
Building the table
TABLES: HOW NATURE (AND THE W3C) INTENDED
243
6
2. Add a caption. Immediately after the table start tag, add a caption element to provide
the table with a title.
A playlist of great music3. Add the basic table structure. Use row groups to provide the table with its basic
structure.
4. Using table header cell elements, add the content for the table head (the column
headers) as in the following code block, remembering to include relevant scope
attribute/value pairs:
Song Name |
Time |
Artist |
Album |
Play Count |
|---|
There??™s no need to add any styling??”not even strong tags.
Pages:
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341