Little known facts about the <table> tag...

The <table> tag has three little-known attributes:

summary: specifies a text summary of the table for browsers that can't display it (or speech synthesis etc)
frame: controls the outer borders of the table (used in conjunction with the "border" attribute)
rules: controls the inner borders of the table (used in conjunction with the "border" attribute)

I can't really give an example of "summary" in use as I'm using IE. Maybe another time...

frame takes one of the following values:

  • box - borders on all 4 sides (default behaviour)
  • border - borders on all 4 sides (default behaviour)
  • void - no outer borders
  • above - border on top only
  • below - border on bottom only
  • lhs - border on left only
  • rhs - border on right only
  • hsides - border on horizontals (top/bottom) only
  • vsides - border on verticals (left/right) only

rules takes one of the following values:

  • all - borders between each row and each column (default behaviour)
  • none - no inner borders
  • rows - borders between each row
  • cols - borders between each column
  • groups - borders separating <thead>, <tbody> and <tfoot> sections

thead cell 1 thead cell 2 thead cell 3
tfoot cell 1 tfoot cell 2 tfoot cell 3
tbody cell 1 tbody cell 2 tbody cell 3
tbody cell 4 tbody cell 5 tbody cell 6
tbody cell 7 tbody cell 8 tbody cell 9

back