Introduction To HTML - Tables Reference Guide - Codecademy
This document provides a reference guide for HTML table elements, including <table>, <tr>, <td>, <th>, <tbody>, <thead>, <tfoot>, and their uses. It explains that <table> contains the overall table, <tr> adds rows, <td> adds data cells, <th> adds header cells, <tbody> contains the body, <thead> contains the header, and <tfoot> contains the footer. It provides examples of how to use each element to structure data in a table.
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)
57 views5 pages
Introduction To HTML - Tables Reference Guide - Codecademy
This document provides a reference guide for HTML table elements, including <table>, <tr>, <td>, <th>, <tbody>, <thead>, <tfoot>, and their uses. It explains that <table> contains the overall table, <tr> adds rows, <td> adds data cells, <th> adds header cells, <tbody> contains the body, <thead> contains the header, and <tfoot> contains the footer. It provides examples of how to use each element to structure data in a table.
colspan Attribute The colspan attribute on a table header <th> or table data <td> element indicates how many columns that particular cell should span within the table. The colspan value is set to 1 by default and will take any positive integer between 1 and 1000.
rowspan Attribute Similar to colspan , the rowspan attribute on a table header or table data element indicates how many rows that particular cell should span within the table. The rowspan value is set to 1 by default and will take any positive integer up to 65534.
The table body element, <tbody> , is a semantic element that will contain all table data other than table heading and table footer content. If used, <tbody> will contain all table row <tr> elements, and indicates that <tr> elements make up the body of the table. <table> cannot have both <tbody> and <tr> as direct children.