About This HTML Issue
The itemscope attribute is a boolean attribute in HTML5, which means it does not take any values. Adding any value (such as true or false) will cause an error. When using boolean attributes, they should either be present or absent. If an attribute like itemscope is present, it is considered true.
Here’s how to correct the error:
Incorrect Usage:
<div itemscope="true">
Correct Usage:
<div itemscope>
Explanation:
-
Simply including the
itemscopeattribute without any value is the correct way to use it. -
If you don’t want to use the
itemscopeattribute, just remove it from the tag.
Learn more:
Last reviewed: September 17, 2024
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.