13.02.2013 Views

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tables<br />

Descendant selectors are essential for avoiding the need for extraneous classes and IDs that might otherwise<br />

litter an XHTML document. By using descendant selectors, the CSS rules can be made more specific, and<br />

there is no limit to how far down the tree a descendant selector will go—the child of a child of a child of a<br />

parent perhaps?<br />

In essence, a table is for tabular data, and tabular data only. Most responsible designers still use tables. You may not be able<br />

to avoid them, but it is important to use them only when necessary.<br />

Tabular data cannot be organized by CSS layout alone, or would make little sense if you tried to do so. Many<br />

designers have concocted methods of rendering complex tabular data such as calendars, timetables, and so<br />

on with pure CSS layout and positioning. That’s great, and certainly an achievement of sorts, but remove the<br />

style sheet, and everything falls apart. The beauty of the table is that it presents information semantically,<br />

provides numerous elements for CSS styling, and still makes perfect sense should the style sheet be made<br />

unavailable.<br />

For the Dirty Pretty Things discography, a table is populated with rows of information relating to each song. If a song has<br />

lyrics, audio, video, guitar tabs, or images assigned to it, a small check image is placed in the appropriate cell. The markup is<br />

fairly straightforward and is bereft of any additional IDs or classes.<br />

<br />

<br />

<br />

TitleReleased<br />

L<br />

A<br />

V<br />

G<br />

I<br />

Comments<br />

<br />

<br />

<br />

Wondering<br />

08/05/06<br />

<br />

<br />

<br />

<br />

-<br />

26<br />

<br />

<br />

chapter 1 Semantic Structure, Dirty Pretty Presentation<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!