Element

body

Error Type

Known

Guidelines

Requirement

id attributes must be unique.

Error

id attribute is not unique.

Short Description

Each id attribute value must be unique.

How To Repair

Modify the id attribute value so it is unique.

Steps To Check

Procedure

1. Check each id attribute to see if it is unique to the document.

Expected Result

1. Each id attribute value is expected to be unique.

Failed Result

1. Modify the id attribute value so it is unique.

Examples

Pass Examples

id attribute values are unique.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xml:lang="en-US" lang="en">
<head>
<title>OAC Testfile - Check #1 - Negative</title>
</head>
<body>
<table border=1 summary="table #1 with IDs and HEADERS">
<tr>
 <th id="city">City</th>
 <th id="state">State</th>
</tr>
<tr>
 <td headers="city">Phoenix</td>
 <td headers="state">Arizona</td>
</tr>
<tr>
 <td headers="city">Seattle</td>
 <td headers="state">Washington</td>
</tr>
</table>


<table border=1 summary="table #2 with IDs and HEADERS">
<tr>
 <th id="bigcity">City</th>
 <th id="bigstate">State</th>
</tr>
<tr>
 <td headers="city">Phoenix</td>
 <td headers="state">Arizona</td>
</tr>
<tr>
 <td headers="city">Seattle</td>
 <td headers="state">Washington</td>
</tr>
</table>
</body>
</html>

Fail Examples

id attribute values are not unique.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xml:lang="en-US" lang="en">
<head>
<title>OAC Testfile - Check #185 - Positive</title>
</head>
<body>
<table border=1 summary="table #1 with IDs and HEADERS">
<tr>
 <th id="city">City</th>
 <th id="state">State</th>
</tr>
<tr>
 <td headers="city">Phoenix</td>
 <td headers="state">Arizona</td>
</tr>
<tr>
 <td headers="city">Seattle</td>
 <td headers="state">Washington</td>
</tr>
</table>


<table border=1 summary="table #2 with IDs and HEADERS">
<tr>
 <th id="city">City</th>
 <th id="state">State</th>
</tr>
<tr>
 <td headers="city">Phoenix</td>
 <td headers="state">Arizona</td>
</tr>
<tr>
 <td headers="city">Seattle</td>
 <td headers="state">Washington</td>
</tr>
</table>
</body>
</html>

English | German | Italiano


Web site engine's code is copyright © 2011
Inclusive Design Institute
Web Service API