HTML Tables — HTML Technical Interview Questions & Answers

table, tr, td, th, thead/tbody/tfoot.

HTML Tables

  • Tables (html) is a HTML topic. In plain words you use it for marks table in a result page. Don’t start with a slogan — start with that picture.
  • Smallest example: th / td / scope. Type it, run it, and say what you see. If you can do that from memory, you know Tables (html).
  • From the example next to this theory: table, tr, td, th, thead/tbody/tfoot.
  • Trap: using tables for page layout. Fix that before you talk about advanced HTML.
  • Viva: what is Tables (html)? Then show th / td / scope. Then name the trap.

Technical Interview Tip: What is Tables (html)? Show this: th / td / scope. Trap: using tables for page layout.

Code Examples for HTML Tables

HTML Tables — working example

<table>
  <caption>Team roster</caption>
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Role</th>
    </tr>
  </thead>
  <tbody>
    <tr><td>Ada</td><td>Engineer</td></tr>
    <tr><td>Lin</td><td>Designer</td></tr>
  </tbody>
</table>

HTML Tables — use caption, thead/tbody, and scope on th for structure and screen readers.

How to Explain HTML Tables to an Interviewer

What is Tables (html)?

Used for marks table a result page Not just the heading

Give one small example of Tables (html).

th / td / scope table, tr, td, th, thead/tbody/tfoot

What mistake do beginners make with Tables (html)?

using tables for page layout Show the fix

Where do you use Tables (html)?

a result page marks table