O'Reilly logo

Microsoft® HTML5 Step by Step by Faithe Wempen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Merging Table Cells

As you have seen in the preceding sections, every cell in a given row must be the same height, and every cell in a given column must be the same width. You can’t make individual cells different heights or widths, but you can span (merge) two or more adjacent cells so that one cell spans multiple rows and/or columns. This technique is useful for centering text across several columns.

image with no caption

It also comes in very handy when creating table-based page layouts, which you’ll learn about on Using Tables for Page Layout.

To merge a cell into adjacent cells to its right, use the colspan attribute and specify the number of columns to be spanned, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required