Skip to main content
HTML Validation

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

About This HTML Issue

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

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

Valid example

Any of these three forms is valid:

<!-- 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.

Find issues like this automatically

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

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries