CHAPTER 6

Creating Lists and Tables

HTML enables you to create lists, such as bulleted and numbered lists, and tables that consist of rows and columns. Lists are great for presenting discrete topics or step-by-step instructions, whereas tables let you not only lay out information in a clear and logical manner, using borders and gridlines to delineate the table visually, but also implement special layout effects.

image

Grasp the Different Types of Lists

Create a Numbered List

Create a Bulleted List

Create a Definition List

Nest One List Inside Another List

Learn the HTML for Tables

Create a Table

Add Rows or Columns to a Table

Specify Table Width and Column Width

Format Table Borders

Adjust Table Padding and Spacing

Create Groups of Columns

Align Tables, Rows, and Cells

Create Cells That Span Rows or Columns

Set a Background Color or Image for a Table

Nest One Table Inside Another Table

Grasp the Different Types of Lists

When you need to present itemized information on a web page, you can use a list. HTML enables you to create three types of lists — numbered lists, bulleted lists, and definition lists — and to create complex lists by nesting those lists with each other. For example, you might create a bulleted sublist within a numbered list, or you might create a numbered sublist using different numbering within another numbered list.

This section explains the list types and illustrates ...

Get Teach Yourself VISUALLY HTML and CSS, 2nd Edition 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.