use HTML4.01 strict if you can, if not then transitional is good enough. Frameset is to be used only for frames. true XHTML is broken in IE6, so I'd avoid using XHTML just yet, until it's usage drops.
@drhowarddrfineApr 02.2008 — #Without a doctype, IE goes into quirks mode and doesn't make an attempt to behave like other modern browsers so, yes, it is required.
@mickliddyApr 02.2008 — #What happens if your using elements from 2 doctypes? I have a page that uses CSS to position the objects around the page and one of the elements is an inline frame! :S
Is there a way to declare a second doctype? or what should I do? The W3C HTML validator is telling me that my page is invalid ?
@FangApr 02.2008 — #One doctype. If using [I]iframe[/I] use Transitional<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
@scragarApr 02.2008 — #iframes don't validate in anything above frameset(since they count as frames), but since IE6- doesn't support the object tag as it should: [code=html]<!--[if !IE]>--> <object data="http://www.site.com/" type="text/html"></object> <!–<![endif]–> <!--[if gte IE 7]> <object data="http://www.site.com/" type="text/html"></object> <![endif]--> <!--[if lt IE 7]> <iframe src ="http://www.site.com"></iframe> <![endif]-->[/code]
@felgallApr 04.2008 — #Scragar's code will validate as Strict since the iframe tag is hidden in a conditional comment so only IE6 and earlier will see it and all other browsers will see the object tag (which is the correct way to do it which Microsoft only implemented in IE7).
@FangApr 04.2008 — #Scragar's code will validate as Strict since the iframe tag is hidden in a conditional comment so only IE6 and earlier will see it and all other browsers will see the object tag (which is the correct way to do it which Microsoft only implemented in IE7).[/QUOTE]You are deceiving the validator by hiding the elements. In IE6 a DTD strict and iframe do not validate.
It's like adding a [I]target[/I] attribute using JavaScript to evade true validation.
The first CC is wrong anyway:<!--[if !IE]><!--> <object data="http://www.site.com/" type="text/html"></object> <!--<![endif]-->