macuser.co.uk).
It wasn??™t long, however, before web designers realized that you could place any web content
within table cells, and this rapidly led to web designers chopping up Photoshop layouts
and piecing them back together in table-based web pages, often by using automated
tools. CSS should have put an end to that, but many web designers continue to use tables
for layout because they??™re simple to set up??”even though they cause problems (see the
???Tables for layout??? section later in the chapter).
The strong will of CSS advocates, who typically shout that tables are evil, sometimes leads
designers to believe that tables should be ditched entirely??”however, that??™s not the case at
all. As mentioned, tables have a specific purpose in HTML, and one that??™s still valid.
Therefore, the bulk of this chapter is going to look at tables in the context for which
they??™re intended: the formatting of tabular data. Web page layout will be looked at in the
next chapter, which concentrates on CSS layout.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
234
How tables work
In this section, we??™re going to look at how tables are structured, and some of the table
element??™s attributes, which enable you to define the table??™s dimensions and borders, along
with the spacing, padding, and alignment of its cells.
Tabular data works via a system of rows and columns, and HTML tables work in the same
way. The table element defines the beginning and end of a table.
Pages:
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328