Skip to main content
HTML Validation

Bad value (true|false) for attribute “itemscope” on element “html”.

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 itemscope attribute without any value is the correct way to use it.
  • If you don’t want to use the itemscope attribute, just remove it from the tag.

Learn more:

Last reviewed: September 17, 2024

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.