Table tag reference

818 views
705 views

Published on

A description of Table Tag in HTML.Also containing cross platform compatibility details. A full coverage of Table Tag is given.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
818
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Table tag reference

  1. 1. Prepared By Gusani Mayank
  2. 2. HTML 4.01 Table Tag Reference
  3. 3. HTML <table> Tag <ul><li>The <table> tag defines an HTML table. </li></ul><ul><li>A simple HTML table consists of the table element and one or more tr, th, and td elements. </li></ul><ul><li>The tr element defines a table row, the th element defines a table header, and the td element defines a table cell. </li></ul><ul><li>A more complex HTML table may also include caption, col, colgroup, thead, tfoot, and tbody elements. </li></ul>
  4. 4. Optional Attributes
  5. 5. Standard Attributes
  6. 6. HTML <caption> Tag <ul><li>The <caption> tag defines a table caption. </li></ul><ul><li>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. </li></ul>
  7. 7. Optional & Standard Attributes
  8. 8. HTML <th> Tag <ul><li>The <th> tag defines a header cell in an HTML table. </li></ul><ul><li>An HTML table has two kinds of cells: </li></ul><ul><li>Header cells - contains header information (created with the th element) </li></ul><ul><li>Standard cells - contains data (created with the td element) </li></ul><ul><li>The text in a th element is bold and centered. </li></ul><ul><li>The text in a td element is regular and left-aligned. </li></ul>
  9. 9. Optional Attributes
  10. 10. Standard Attributes
  11. 11. HTML <tr> Tag <ul><li>The <tr> tag defines a row in an HTML table. </li></ul><ul><li>A tr element contains one or more th or td elements. </li></ul>
  12. 12. Standard Attributes
  13. 13. HTML <td> Tag <ul><li>The <td> tag defines a standard cell in an HTML table. </li></ul><ul><li>An HTML table has two kinds of cells: </li></ul><ul><li>Header cells - contains header information (created with the th element) </li></ul><ul><li>Standard cells - contains data (created with the td element) </li></ul><ul><li>The text in a th element is bold and centered. </li></ul><ul><li>The text in a td element is regular and left-aligned. </li></ul>
  14. 14. Optional Attributes
  15. 15. Standard Attributes
  16. 16. HTML <thead> Tag <ul><li>The <thead> tag is used to group the header content in an HTML table. </li></ul><ul><li>The thead element should be used in conjunction with the tbody and tfoot elements. </li></ul><ul><li>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. </li></ul><ul><li><tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data. </li></ul><ul><li>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. </li></ul>
  17. 17. Optional Attributes
  18. 18. Standard Attributes
  19. 19. HTML <tbody> Tag <ul><li>The <tbody> tag is used to group the body content in an HTML table. </li></ul><ul><li>The tbody element should be used in conjunction with the thead and tfoot elements. </li></ul><ul><li>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. </li></ul><ul><li><tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data. </li></ul><ul><li>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. </li></ul>
  20. 20. Optional Attributes
  21. 21. Standard Attributes
  22. 22. HTML <tfoot> Tag <ul><li>The <tfoot> tag is used to group the footer content in an HTML table. </li></ul><ul><li>The tfoot element should be used in conjunction with the thead and tbody elements. </li></ul><ul><li>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. </li></ul><ul><li><tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data. </li></ul><ul><li>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. </li></ul>
  23. 23. Optional Attributes
  24. 24. Standard Attributes
  25. 25. HTML <col> Tag <ul><li>The <col> tag defines attribute values for one or more columns in a table. </li></ul><ul><li>The <col> tag is useful for applying styles to entire columns, instead of repeating the styles for each cell, for each row. </li></ul><ul><li>The <col> tag can only be used inside a table or a colgroup element. </li></ul><ul><li>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. </li></ul>
  26. 26. Optional Attributes
  27. 27. Standard Attributes
  28. 28. HTML <colgroup> Tag <ul><li>The <colgroup> tag is used to group columns in a table for formatting. </li></ul><ul><li>The <colgroup> tag is useful for applying styles to entire columns, instead of repeating the styles for each cell, for each row. </li></ul><ul><li>The <colgroup> tag can only be used inside a table element. </li></ul><ul><li>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. </li></ul>
  29. 29. Optional Attributes
  30. 30. Standard Attributes
  31. 31. End Of HTML Tour

×