Chapter 12. Formatting Tables

Formatting Tables

In this chapter you will learn to:

  • ✓ Apply table borders.

  • ✓ Apply background and foreground fills.

  • ✓ Change cell padding, spacing, and alignment.

  • ✓ Apply column-based formatting.

Chapter 11, explained how to create tables structurally; now it’s time to learn how to make them more attractive. By default, a table is just a plain container—no border, no shading, no text formatting. It’s up to you to add all those things if you want them.

Not every table needs elaborate formatting. If you are using a table as a container for a page layout, as demonstrated in Chapter 11, you probably want the table to be as unobtrusive as ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.