Upload
mayank-soni
View
521
Download
3
Tags:
Embed Size (px)
DESCRIPTION
A description of Table Tag in HTML.Also containing cross platform compatibility details. A full coverage of Table Tag is given.
Citation preview
Prepared By Gusani Mayank
HTML 4.01 Table Tag Reference
HTML <table> TagThe <table> tag defines an HTML table.A simple HTML table consists of the table
element and one or more tr, th, and td elements.
The tr element defines a table row, the th element defines a table header, and the td element defines a table cell.
A more complex HTML table may also include caption, col, colgroup, thead, tfoot, and tbody elements.
Optional Attributes
Standard Attributes
HTML <caption> TagThe <caption> tag defines a table caption.
The <caption> tag must be inserted immediately after the <table> tag. You can specify only one caption per table. Usually the caption will be centered above the table.
Optional & Standard Attributes
HTML <th> TagThe <th> tag defines a header cell in an
HTML table.An HTML table has two kinds of cells:Header cells - contains header information
(created with the th element)Standard cells - contains data (created with
the td element)The text in a th element is bold and centered.The text in a td element is regular and left-
aligned.
Optional Attributes
Standard Attributes
HTML <tr> TagThe <tr> tag defines a row in an HTML table.A tr element contains one or more th or td elements.
Standard Attributes
HTML <td> TagThe <td> tag defines a standard cell in an
HTML table.An HTML table has two kinds of cells:Header cells - contains header information
(created with the th element)Standard cells - contains data (created with
the td element)The text in a th element is bold and centered.The text in a td element is regular and left-
aligned.
Optional Attributes
Standard Attributes
HTML <thead> TagThe <thead> tag is used to group the header
content in an HTML table.The thead element should be used in conjunction
with the tbody and tfoot elements.The tbody element is used to group the body content
in an HTML table and the tfoot element is used to group the footer content in an HTML table.
<tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data.
Notice that these elements will not affect the layout of the table by default. However, you can use CSS to let these elements affect the table's layout.
Optional Attributes
Standard Attributes
HTML <tbody> TagThe <tbody> tag is used to group the body content
in an HTML table.The tbody element should be used in conjunction
with the thead and tfoot elements.The thead element is used to group the header
content in an HTML table and the tfoot element is used to group the footer content in an HTML table.
<tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data.
Notice that these elements will not affect the layout of the table by default. However, you can use CSS to let these elements affect the table's layout.
Optional Attributes
Standard Attributes
HTML <tfoot> TagThe <tfoot> tag is used to group the footer content
in an HTML table.The tfoot element should be used in conjunction
with the thead and tbody elements.The thead element is used to group the header
content in an HTML table and the tbody element is used to group the body content in an HTML table.
<tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data.
Notice that these elements will not affect the layout of the table by default. However, you can use CSS to let these elements affect the table's layout.
Optional Attributes
Standard Attributes
HTML <col> TagThe <col> tag defines attribute values for
one or more columns in a table.The <col> tag is useful for applying styles to
entire columns, instead of repeating the styles for each cell, for each row.
The <col> tag can only be used inside a table or a colgroup element.
Add the style attribute to the <col> tag, and let CSS take care of backgrounds, width and borders. These are the ONLY CSS properties that work with the <col> tag.
Optional Attributes
Standard Attributes
HTML <colgroup> TagThe <colgroup> tag is used to group columns
in a table for formatting.The <colgroup> tag is useful for applying
styles to entire columns, instead of repeating the styles for each cell, for each row.
The <colgroup> tag can only be used inside a table element.
Add the style attribute to the <colgroup> tag, and let CSS take care of backgrounds, width and borders. These are the ONLY CSS properties that work with the <colgroup> tag.
Optional Attributes
Standard Attributes
End Of HTML Tour