These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:20 pm Advanced search

Adding iframe to XHTML 1.1 doctype

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

Adding iframe to XHTML 1.1 doctype

Postby JAB Creations » Fri Jan 21, 2011 8:18 pm

The following resolves all the iframe validation issues except for "document type does not allow element "iframe" here" which I'm not sure how to resolve?

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [<!ENTITY % special.extra "iframe"><!ELEMENT iframe EMPTY><!ATTLIST iframe border CDATA #IMPLIED frameborder (0|1) "0" id ID #IMPLIED onfocus CDATA #IMPLIED scrolling (yes|no|auto) "auto" src CDATA #REQUIRED style CDATA #IMPLIED tabindex CDATA #IMPLIED>]>
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Adding iframe to XHTML 1.1 doctype

Postby zcorpan » Wed Mar 30, 2011 4:43 pm

If you use application/xhtml+xml, skip the doctype altogether and validate with validator.nu without DTDs. It'll validate against XHTML5 by default, which allows iframes.

If you use text/html, you can't use the internal subset anyway so just use <!doctype html>.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests