Skip to main content

HTML Guide

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

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:

Related W3C validator issues