Help - Search - Members - Calendar
Full Version: What's non-strict HTML?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Angus
If I Google "non-strict html" I get surprisingly few hits. If I Google the same and limit the search to htmlhelp.com I don't get any hits that explain what it is--this site does list certain tags and attributes as "non-strict" but I can't find an explanation of what that means. My feeling is that it is something that is somehow only compatible in quirks mode, and shouldn't be used in standards mode. But I have a document that uses some of this non-strict HTML in a strict document, and I'm yet to be forced to regret it. So what is non-strict HTML then?
pandy
Standards/Strict mode doesn't require a a Strict doctype. The doctype switching is a whole other ball game.

"Non-strict" probably refers to that the element or attribute in question isn't allowed in (X)HTML Strict. It could be allowed in (X)HTML Transitional or it's totally non standard.

You could say that Strict is core HTML. Transitional allows deprecated, mostly presentational, elements and attributes that Strict doesn't. So for example FONT could be said to be non-strict.

Christian J
See also http://htmlhelp.com/tools/validator/doctype.html which says

QUOTE
HTML 4.01 Strict is a trimmed down version of HTML 4.01 that emphasizes structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4 Strict. By writing to HTML 4 Strict, authors can achieve accessible, structurally rich documents that easily adapt to style sheets and different browsing situations. However, HTML 4 Strict documents may look bland on very old browsers that lack support for style sheets.



Angus
QUOTE(Christian J @ Aug 14 2008, 03:36 PM) *

See also http://htmlhelp.com/tools/validator/doctype.html which says

QUOTE
HTML 4.01 Strict is a trimmed down version of HTML 4.01 that emphasizes structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4 Strict. By writing to HTML 4 Strict, authors can achieve accessible, structurally rich documents that easily adapt to style sheets and different browsing situations. However, HTML 4 Strict documents may look bland on very old browsers that lack support for style sheets.



So all this still begs the question: why have I been able to use non-strict elements and attributes in a strict document? What should the consequences of such a thing be?
pandy
Because browsers don't care. They don't use the doctype at all other than for this doctype switching crazy (the rendering modes). Had you tried to validate your HTML you would have been told about the non-strict stuff.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.