Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML DOM Table Summary Property

  • Last Updated : 04 Jan, 2022

The HTML DOM Table Summary Property is used to set or return the value of the summary attribute of a <table> element. The summary attribute is used to define the summary of the table. 

Note: This property is not supported by HTML5

Syntax:

  • It is used to return the Table Summary property.
    tableObject.Summary;
  • It is used to set the Table Summary Property.
    tableObject.Summary="text";

Property Values: It contains the single value i.e text which specify the summary of the table. 

 

Example: Below HTML code illustrates how to return the summary property. 

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>
        Table Summary Property in HTML 
    </title>
      
    <style>
        table,
        td {
            border: 1px solid green;
        }
  
        h1 {
            color: green;
        }
  
        h2 {
            font-family: Impact;
        }
  
        body {
            text-align: center;
        }
    </style>
</head>
  
<body>
    <h1>GeeksforGeeks</h1>
    <h2>HTML DOM Table summary Property</h2>
  
    <table id="GFG" align="center" cellspacing="5" 
        summary="courses@GeeksFprGeeks">
          
        <thead>
            <tr>
                <th>Subject</th>
                <th>Courses</th>
            </tr>
        </thead>
        <tr>
            <td>Java</td>
            <td>Fork Java</td>
        </tr>
        <tr>
            <td>Python</td>
            <td>Fork Python</td>
        </tr>
        <tr>
            <td>Placements</td>
            <td>Sudo Placement</td>
        </tr>
    </table>
    <br>
  
    <button ondblclick="Table_Caption()">
        Return CellPadding
    </button>
      
    <p id="sudo"></p>
      
    <script>
        function Table_Caption() {
            var w = document.getElementById("GFG").summary;
            document.getElementById("sudo").innerHTML = w;
        }
    </script>
</body>
  
</html>

Output:

Supported Browsers:

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!