w3resource

HTML summary attribute

summary

The purpose of the HTML summary attribute is to specify a text which a summary of the purpose as well as structure of a table. Using this attribute is useful for
non-visual media such as speech and Braille.

Supported elements

HTML summary attribute supports table element.

Syntax

<table summary="value" >.....</summary>

Type of value

Text.

Value

Text.

Default value

There is no default value of HTML summary attribute.

Supported doctypes

HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.

Example of HTML summary attribute with table element

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML summary attribute with table element</title>
</head>
<body>
<table border="1" summary="This is table of country and their capitals. First column describes country and the second column describe capital." >
<tr>
<td>USA</td>
<td>Washington,D.C.</td>
</tr>
<tr>
<td>UK</td>
<td>London</td>
</tr>
</table>
</body>
</html>

Result

html summary attribute with table element

View this example in a separate browser window

Example of HTML summary attribute with table element

Previous: style attribute of an HTML element
Next: HTML tabindex attribute

Test your Programming skills with w3resource's quiz.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/html/attributes/html-summary-attribute.php