The document provides a cheat sheet on HTML table elements including <table>, <tr>, <th>, <td>, <thead>, <tbody>, <tfoot>, <caption>, <col>, <colgroup>. It also gives examples of using these elements and CSS snippets for styling tables.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views3 pages
Tables CS
The document provides a cheat sheet on HTML table elements including <table>, <tr>, <th>, <td>, <thead>, <tbody>, <tfoot>, <caption>, <col>, <colgroup>. It also gives examples of using these elements and CSS snippets for styling tables.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3
Tables cheat sheet
Tags
<table> <tr> <th scope="…">
The element that surrounds all other table Defines a row of cells in the table. Defines a heading cell to label a row or column. elements. scope="row" — for row labels. No other table element can be outside the scope="col" — for column labels. <table>
<td> <thead> <tbody>
Defines a single piece of data in the table—a To group the table rows that define the To group the table rows that account for the cell. headers. main data. Can have many other HTML elements inside, Must have at least one <tr> inside. including other tables. rowspan="…" — allows merging of cells vertically. colspan="…" — allows merging of cells horizontally.
<tfoot> <caption> <col>
To group the table rows that define the footer, To add a visible caption that describes the Non-visible element that defines a column for like totals. purpose of the table. styling. Must have at least one <tr> inside. Really good for accessibility.
<colgroup> Non-visible element that defines a group of columns for accessibility and styling. Examples