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

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-yes-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>` is a boolean attribute and does not accept a value like `"yes"`.

Boolean attributes in HTML work by their presence or absence alone. When a boolean attribute is present on an element, it means "true." When it is absent, it means "false." Valid ways to write a boolean attribute are: the attribute name with no value, an empty string value (`""`), or the attribute name itself as the value. Assigning `"yes"`, `"true"`, or any other string is invalid.

This applies to all boolean attributes in HTML, such as `disabled`, `checked`, `autoplay`, `muted`, and `allowfullscreen`.

## Invalid example

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

## Valid example

Any of these three forms is valid:

```html
<!-- Attribute name only (most common) -->
<iframe
  src="https://example.com/video"
  allowfullscreen>
</iframe>

<!-- Empty string value -->
<iframe
  src="https://example.com/video"
  allowfullscreen="">
</iframe>

<!-- Attribute name as the value -->
<iframe
  src="https://example.com/video"
  allowfullscreen="allowfullscreen">
</iframe>
```

The first form, with just `allowfullscreen` and no value, is the most widely used and the most readable.
