🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Expert Masterclasses.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

HTML <table> Tag

Structure tabular data. Learn table, tr, th, td, thead, tbody.

table.html
<!-- Tabular data -->
<table>
<tr><th>Name</th><td>Alice</td></tr>
</table>
📊
table.html
1 / 7
📊

Tutor:The <table> tag represents tabular data. Use <tr> for rows, <th> for header cells, <td> for data cells. Tables are for data in rows and columns—not for page layout. Use semantic structure: thead, tbody, tfoot, caption.


Table Mastery

Structure tabular data with table, tr, th, td.

Concept 1: The Table Tag

The <table> tag represents tabular data. Use <tr> for rows, <th> for header cells, <td> for data cells. Tables are for data in rows and columns—not for page layout.

System Check

Which element represents a header cell in a table?


Community Holo-Net

Table Patterns

Using thead, tbody, scope? Share your patterns.

Enjoying this guide?

Codesyllabus is 100% free and open-source. Support our mission, pay for server infrastructure, and fuel new tutorials by buying us a coffee!

HTML <table> Tag

Author

Pascual Vila

Frontend Instructor.

The <table> tag represents tabular data. Use <tr> for rows, <th> for header cells, <td> for data cells. Use <thead>, <tbody>, <tfoot> for structure and <caption> for a table title. Do not use tables for page layout—use for data only. Prefer CSS Grid or Flexbox for layout.

Structure and accessibility

Use scope="col" or scope="row" on <th> to associate headers with cells (screen readers). Use <caption> for the table title. colspan and rowspan merge cells when needed.

Best practices

Use tables only for tabular data. Wrap header rows in <thead>, body in <tbody>, footer in <tfoot>. Add <caption> and scope on <th> for accessibility.

Table Tag Glossary

<table>
Represents tabular data. Contains rows (<tr>) with header cells (<th>) or data cells (<td>). Use for data, not layout.
<th> / <td>
<th> = header cell (bold by default). <td> = data cell. Use scope on <th> for accessibility. Both go inside <tr>.
<thead>, <tbody>, <caption>
Structure: thead = header rows, tbody = body, tfoot = footer. caption = table title (place after <table>). Improves semantics and accessibility.