Skip to content
Related Articles

Related Articles

Improve Article

HTML DOM TableRow sectionRowIndex Property

  • Last Updated : 31 Oct, 2019

The TableRow sectionRowIndex property in HTML DOM is used to return the position of a row in the rows collection of a <thead>, <tbody>, or <tfoot> element.

Syntax: It returns the sectionRowIndex property.


Return Value: It returns a numeric value which represents the position of the row in the rows collection of a <thead>, <tbody>, or <tfoot> element.


<!DOCTYPE html> 
        HTML DOM sectiontableRow rowIndex Property
        table, th, td { 
            border: 1px solid green; 
    <h2>HTML DOM sectiontableRow rowIndex Property</h2
        Click on the row to get the
        section index of the rows
        <tr id = "GFG" onclick="myGeeks(this)"
        <tr id = "GFG" onclick="myGeeks(this)"
        <tr id = "GFG" onclick="myGeeks(this)"
    <p id = "sudo"></p>
        function myGeeks(x) {
            alert("sectionRow index is: "
                    + x.sectionRowIndex);


  • Before Clocking on Button:
  • after Clicking on Button:

Supported Browsers: The browsers supported by HTML DOM TableRow sectionRowIndex property are listed below:

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

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :