# Bad value “1” for attribute “allowfullscreen” on element “iframe”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-1-for-attribute-allowfullscreen-on-element-iframe
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `allowfullscreen` attribute on an `iframe` element is a boolean attribute and should not be assigned a value like `"1"`.

Boolean attributes in HTML don't need a value. Their mere presence on an element means "true," and their absence means "false." When you write `allowfullscreen="1"`, the W3C validator flags it because `"1"` is not a valid value for a boolean attribute.

According to the HTML specification, a boolean attribute can only have three valid forms: the attribute name alone (`allowfullscreen`), an empty string (`allowfullscreen=""`), or the attribute's own name as the value (`allowfullscreen="allowfullscreen"`). Any other value, including `"1"`, `"true"`, or `"yes"`, is technically invalid.

## Invalid Example

```html
<iframe
  src="https://www.example.com/video"
  allowfullscreen="1">
</iframe>
```

## Valid Example

```html
<iframe
  src="https://www.example.com/video"
  allowfullscreen>
</iframe>
```
