How do you create a table in HTML?

Use the <table> tag. Inside it, each row is a <tr>, header cells are <th> and data cells are <td>.

<table>
  <tr>
    <th>Name</th>
    <th>Marks</th>
  </tr>
  <tr>
    <td>Robin</td>
    <td>85</td>
  </tr>
</table>
Output in the browser
Name Marks
Robin 85

Add borders with CSS. See HTML Tables.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.