Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to create a table row using HTML5 ?

  • Last Updated : 02 Jun, 2020

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.


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<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
Recommended Articles
Page :

Start Your Coding Journey Now!