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.