Skip to content
Related Articles

Related Articles

How to create a table row using HTML5 ?

Improve Article
Save Article
  • Last Updated : 02 Jun, 2020
Improve Article
Save Article

In this article, we define a row in a table by using a <tr> tag in a document. This tag is used to define a row in an HTML table. The tr element contains multiple th or td elements.


<tr> ... </tr>


<!DOCTYPE html>
        How to define row of a table
        body {
            text-align: center;
        h1 {
            color: green;
        th {
            color: blue;
        td {
            border: 1px solid black;
            border-collapse: collapse;
            HTML5: How to define 
            a row in a table?
                <!-- tr tag starts here -->
                    <th>User Id</th>
                <!-- tr tag end here -->


Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!