Chapter 8. Table Markup
8
Table Markup
In this Chapter
How tables are used
Basic table structure
Spanning rows and columns
Row and column groups
Making tables accessible
Before we launch into the markup for tables, let’s check on our progress so far. We’ve covered a lot of territory: how to establish the basic structure of an HTML document, how to mark up text to give it meaning and structure, how to make links, and how to embed simple images in a page.
This chapter and the next two chapters, Chapter 9, Forms, and Chapter 10, Embedded Media, describe the markup for specialized content that you might not have a need for right away. If you’re getting antsy to make your pages look good, you can skip right to Part III, CSS for Presentation, and start playing with styles. These three chapters will be waiting for you when you’re ready for them.
Are you still here? Great. Let’s talk tables. We’ll start out by reviewing how tables should be used, then learn about the elements used to create them. Remember, this is an HTML chapter, so we’re going to focus on the markup that structures the table content, and we won’t be concerned with how the tables look (that will be tackled in various CSS chapters in Part III).
How to Use Tables
HTML tables were created for instances when you need to add tabular material (data arranged into rows and columns) to a web page. Tables may be used to organize schedules, product comparisons, statistics, or other types of information, as shown in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access