10. Tables vs Layout
Tables should be used for tabular data.
Good use:
Employee | Department | Salary
Not recommended:
Using tables to position
a website's navigation,
images and buttons.
Modern layouts should use CSS Flexbox and Grid instead.
🧠 Remember
<table> → Entire table<tr> → Table row<th> → Header cell<td> → Data cell<thead> → Header section<tbody> → Main data section<tfoot> → Footer/summary section Key Takeaway
A semantic table usually follows this structure:
<table>
↓
<thead> → column headings
↓
<tbody> → actual data
↓
<tfoot> → totals/summary
HTML tables are primarily about representing relationships between rows and columns. CSS will later control how the table looks.
Double Tap ❤️ For More