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
HTML Lists
HTML Tables
HTML Table Rowspan & Colspan
Exercises & Assignments
Write an HTML program to create an unordered list of fruits
Write an HTML program to create an ordered and a nested list
Write an HTML program to create a table of student marks
Write an HTML program to create a table with colspan and rowspan
Interview Questions & Answers
What are different tags to list items in HTML?
How do you create a table in HTML?
What is the use of colspan and rowspan in HTML?