Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML DOM Table Summary Property

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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@GeeksForGeeks">
         
        <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 Summary of Table
    </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
Last Updated : 07 Sep, 2022
Like Article
Save Article
Similar Reads
Related Tutorials