You are here: Reference > JavaScript > client-side > HTML DOM > properties > summary (table)

summary property (table)

Browser support:
Specifies or returns a summary of the data represented in a table.
The functionality of this property is not implemented in browsers. Typically used by applications that attach detailed information such as non-visual media (speech) to a table.

Syntax:

object.summary;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: summary

Possible values:

String that sets or retrieves the summary text.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the summary attribute:
<table id="myTable" border="1px" summary="This table summarizes fruit costs.">
    <tr>
        <td>Apple</td>
        <td>Pear</td>
        <td>Peach</td>
    </tr>
    <tr>
        <td>12.74</td>
        <td>54.00</td>
        <td>45.00</td>
    </tr>
</table>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the summary property:
<head>
    <script type="text/javascript">
        function GetSummary () {
            var table = document.getElementById ("myTable");
            alert ("TABLE summary= " + table.summary);
        }
    </script>
</head>
<body>
    <table id="myTable" border="1px" summary="This table summarizes fruits costs.">
        <tr>
            <td>Apple</td>
            <td>Pear</td>
            <td>Peach</td>
        </tr>
        <tr>
            <td>12.74</td>
            <td>54.00</td>
            <td>45.00</td>
        </tr>
    </table>

    <button onclick="GetSummary ();">Get summary text!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content