Home

Table of
Contents


Editors

Tags

Text
Formatting


Entities

Links

Frames

Tables

Lists

Forms

Images

Backgrounds

 


Tables

Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.

Tables and the Border Attribute

If you do not specify a border attribute the table will be displayed without any borders. Sometimes this can be useful, but most of the time, you want the borders to be shown.

Headings in a Table

Headings in a table are defined with the <th> tag.

Table Tags

Tags Description
<table> Defines a Table
<th> Defines a Table Header
<tr> Defines a Table Row
<td> Defines a Table Cell
<caption> Defines a Table Caption
<colgroup> Defines groups of Table Columns
<col> Defines the Attributes Values for onr or more Columns in a Table
<thead> Defines a Table Head
<tbody> Defines a Table Body
<tfoot> Defines a Table Footer

Tables Without Border
This example demonstrates a table with no borders.

Headings in a Table
This example demonstrates how to display table headers

Table with a caption
This example demonstrates a table with a caption.

Table cells that span more than one row/column
This example demonstrates how to define table cells that span more than one row or one column.