table

< html‎ | elements
Jump to: navigation, search

table

This article is Not Ready.


W3C Recommendation

Summary

The <table> element is a wrapper for an HTML table. It defines the start and end of a table, and as such can contain other table elements, such as <tr>.


Overview Table

DOM Interface HTMLTableElement

The <table> element is a container for HTML tables, which are used to markup tabular data.

Tables are also often used for laying out web pages, but this is a bad practice that should not be done anymore. Use <div> and <span> instead for layouts.

Examples

This example uses the tbody element with the table, td, thead, and tr elements to create a table with the first row in the table head and the second row in the table body.

HTML

<table>
  <thead>
    <tr>
      <td>
        This text is in the thead.
      </td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        This text is in the tbody.
      </td>
    </tr>
  </tbody>
</table>



Related specifications

Specification Status Related Changes
HTML 5.1 Editor's Draft
[ ]

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related articles

HTML


















































… further results

Tables









  • html/elements/table