Chapter 12 Formatting Tables

To apply a border to a table

Applying Table Borders

Argument method:

<table border="n">

where n is a number of pixels.

Style method:

<table style="border-style: type; border-width=n">

where type is one of the following values: solid, dotted, dashed, double, groove, ridge, inset, outset, or none.

To assign a color to a table border

Applying Table Borders

Argument method:

<table border="n" bordercolor="color">

where color is a color expressed as a name, an RGB value, or a hexadecimal number.

Style method:

<table style="border-style: style; border-color: color">

where color is a color expressed as a name, an RGB value, or a hexadecimal number.

To apply the width, color, and style of a border by using a single command

Applying Table Borders ...

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.