Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Text not allowed in element “iframe” in this context.

<iframe> tags are used to embed another document within the current document. To indicate the contents of that nested document, you can either use the src attribute with an URL, or directly provide the contents with the srcdoc attribute. Examples:

<!-- This will embed a document by its URL -->
<iframe src="https://example.com"></iframe>

<!-- This will embed the contents provided in the srcdoc attribute -->
<iframe srcdoc="<p>some content</p>"></iframe>

<!-- This is invalid -->
<iframe><p>some content</p></iframe>

Related W3C validator issues