w3resource

HTML axis attribute

axis

The purpose of the HTML axis attribute is to specify a comma-separated list of category names for a table cell or table header cell.

Supported elements

HTML axis attribute supports td and th elements.

Syntax

<ElementName axis="value" >.....</ElementName>

Type of value

Type of value of HTML axis attribute is a sequence of character data.

Value

Names of the table head or row categories.

Default value

There is no default value of HTML axis attribute.

Supported doctypes

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

Example of HTML axis attribute with td and th

<!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 axis attribute with td and th</title>
</head>
<body>
<table border="1">
<tr>
<th axis="State">Country</th>
<th axis="Capital">Capital of the Country</th>
</tr>
<tr>
<td axis="State">USA</td>
<td axis="City">Washington,D.C.</td>
</tr>
<tr>
<td axis="State">UK</td>
<td axis="City">London</td>
</tr>
</table>
</body>
</html>

Result

html axis attribute with td and th

View this example in a separate browser window

Example of HTML axis attribute with td and th.

Previous: HTML archive attribute
Next: HTML border 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-axis-attribute.php