why is it that the following xhtml transitional code <ul> <strong> text text </strong> <li>text text</li> <li>text text</li> .... Code (markup): will throw IE7 into quirks mode but not FF? it doesn't validate at all! just curious.
The <ul> may contain only one or more of the <li> element. See http://www.w3.org/TR/html401/struct/lists.html#edef-UL cheers, gary
no no i know why it doesn't validate... i was just wondering why one browser went into quirks mode when the other didn't. it wasn't a terribly important question, i'll admit, but seemed worth knowing.
i was wondering why FF *wasn't* in quirks mode... like i said, i know why it's technically invalid code, so i understand why IE is in quirks mode. FF isn't tho... and that's what is confusing to me.
Quirks has nix to do with good or bad code. Quirks mode is built-in to browsers simply because in the early days of the web there were very few if any doctypes. Now browsers don't care about doctypes and in the early days, what, IE and Nutscrape had their own DOMs? so people wrote code to match each browser... But when the Doctype started to matter as far as standards (and the doctype is really only there so the validator, not the browser, knows which rules the page should follow), IE was all like, well if we actually comply with the rules we'll Break Teh Interwebz! Oh noes! So they set it up that IE would act like its old self for old (non-doctyped) pages (quirks mode) and act a bit more modern when it sees a doctype. In fact, as I understand it, Doctype was simply chosen as the browser's determiner of how old the page was (assuming old pages were written to work with bad old IE styles). FF has a quirks mode too, or a sub-standard or an Almost There or some junk. Again, this may also only be influenced by the doctype and not the code. Besides, how would you know if FF went into quirks mode? You'd have to look for a certain thing FF2 can do with pages that Mozilla 1.0 can't or something to tell. You can have 100% crapola junk invalid code and still keep everyone in standards mode. They will (correctly) make your bad code page look like shit : ) Take a beautifully-written, semantic valid well-coded thing of zen-like quiet and remove the doctype and watch IE clumsily splatter to the ground in Quirks mode and who knows, possibly FF and Opera as well. Sticking something before the doctype is the thing that gets me. IE considers it "no doctype"... wtf?