Table Captions - HTML

Table captions (<caption>) provide an easy method to add descriptive text to a table. For example, suppose you wanted to caption a table detailing the refresh rates of a monitor. The following code adds an appropriate caption to a table, whose output.
Cell Attributes

Cell Attributes

Captions (“Supported Refresh Rates” in this example) are displayed above the table.

Captions (“Supported Refresh Rates” in this example) are displayed above the table.

Note that the <caption> tag must appear immediately after the <table> tag. Captions typically appear centered above the table to which they are attached—although different user agents may interpret the caption differently.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics