About This HTML Issue
The value of the name attribute on an <iframe> should not start with an underscore (_).
Browsing context names that begin with an underscore are reserved keywords in HTML, like _blank, _self, _parent, and _top. Using these reserved names or any custom name starting with an underscore for the name attribute of an <iframe> can lead to unexpected behavior and is considered invalid HTML.
Here’s how to fix the issue:
Problematic Code
<iframe src="https://example.com" name="_example"></iframe>
Solution
To resolve this issue, you should use a valid value for the name attribute that does not start with an underscore.
Corrected Code
<iframe src="https://example.com" name="example"></iframe>
Steps:
-
Identify the
iframeelement with the invalidnameattribute value that starts with an underscore. -
Replace the name value with a valid identifier that does not start with
_. Use letters, numbers, hyphens (-), and underscores (_) (but not at the beginning).
Learn more:
Last reviewed: September 13, 2024
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.