Top Banner
Prepared By Gusani Mayank
31

Table tag reference

Dec 17, 2014

Download

Technology

mayank Soni

A description of Table Tag in HTML.Also containing cross platform compatibility details. A full coverage of Table Tag is given.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Table tag reference

Prepared By Gusani Mayank

Page 2: Table tag reference

HTML 4.01 Table Tag Reference

Page 3: 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.

Page 4: Table tag reference

Optional Attributes

Page 5: Table tag reference

Standard Attributes

Page 6: Table tag reference

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.

Page 7: Table tag reference

Optional & Standard Attributes

Page 8: Table tag reference

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.

Page 9: Table tag reference

Optional Attributes

Page 10: Table tag reference

Standard Attributes

Page 11: Table tag reference

HTML <tr> TagThe <tr> tag defines a row in an HTML table.A tr element contains one or more th or td elements.

Page 12: Table tag reference

Standard Attributes

Page 13: Table tag reference

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.

Page 14: Table tag reference

Optional Attributes

Page 15: Table tag reference

Standard Attributes

Page 16: Table tag reference

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.

Page 17: Table tag reference

Optional Attributes

Page 18: Table tag reference

Standard Attributes

Page 19: Table tag reference

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.

Page 20: Table tag reference

Optional Attributes

Page 21: Table tag reference

Standard Attributes

Page 22: Table tag reference

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.

Page 23: Table tag reference

Optional Attributes

Page 24: Table tag reference

Standard Attributes

Page 25: Table tag reference

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.

Page 26: Table tag reference

Optional Attributes

Page 27: Table tag reference

Standard Attributes

Page 28: Table tag reference

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.

Page 29: Table tag reference

Optional Attributes

Page 30: Table tag reference

Standard Attributes

Page 31: Table tag reference

End Of HTML Tour