HTML tables -

Back to notes

HTML tables

html, tables
  • <table> element creates a table
  • <tr> adds rows
  • <td> adds data to rows
  • <th> adds headings to give context
  • use colspan attribute to merge horizontally
  • use rowspan attribute to merge vertically
  • tables can have a header, body, and footer
    • <thead>, <tbody>, <tfoot>
  • tables can be styled with CSS