Skip to content
doubtly

1 answer

HTML tables help web developers to set the data into rows and columns.

The <table> tag is there in the HTML table.
Each table row can be defined with a <tr> tag.
Each header can be defined with a <th> tag. 
Each data or the cell is defined with a <td> tag.
If your text is in the  <th> elements then they will be bold and centered.
If your text is in the <td> elements then they will be regular and left-aligned.

<table style="width:100%">
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    <th>Hobbies</th>
  </tr>
  <tr>
    <td>Ram</td>
    <td>Kumar</td>
    <td>Travelling</td>
  </tr>
  <tr>
    <td>Shyam</td>
    <td>Chadra</td>
    <td>Reading books</td>
  </tr>
</table>
codelikepro · 19 Aug 2022 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.