Forum Moderators: open
Thus I was wondering which versions of (x)html and CSS I should go to when looking things up/learning things I dont know yet.
- Should I use the latest xhtml version - xhtml 1.1?
- Is it true that xhtml 1.0 is a subset of html 4.01? Meaning all xhtml 1.0 code is html 4.01 code (but all html 4.01 code isn't necessarily xhtml 1.0 code)?
- If that's true, I think I should learn xhtml. However: Should I learn xhtml 1.1 or xhtml 1.0? Is all xhtml 1.1 also valid html 4.01 code?
thanks
Why most of us should NOT use XHTML [webmasterworld.com]
My advise is to learn and use HTML 4 strict. Using the strict version instead of transitional is the single best step you can take, even if you do use xhtml. By learning the strict version (even if you sometimes need to back off and create a transitional page) you will gain a much more soldi understanding of exactly what html is and is intended to be.
CSS versions depend mostly on adding new selectors, so if a stylesheet is valid CSS1 then it is also valid as CSS2. The important thing with CSS is whether browsers support the selectors you use, and this improves with every new browser release.
Consistent and non-buggy browser support for CSS was very slow coming, but today you can do very well with almost all of CSS2 [w3.org]. CSS 3 [w3.org] is still under development and not ready for prime time.
Thus I was thinking the whole document could stay the same and only the doctype-code-line would have to be replaced (which would take < 1 minute for each document) to go from one to another.
But now I read that XHTML is really HTML 4 in quirksmode?
Does that mean there are things that are different between xhtml 1.0 strict and html 4.01 strict? I found this great tutorial resource which I started yesterday, but its about xhtml 1.0 I think - not html 4.01 so now Im wondering if I'd be better of finding another one.
thanks!
[edited by: encyclo at 4:38 pm (utc) on Nov. 24, 2007]
XHTML is really HTML 4 in quirksmode
That would be either a misunderstanding, or carelessness with technical terms. "Quirks mode" is used in comparison to "Standards-compliance mode", which are ways of describing rendering modes or how a browser handles markup. Certain factors trigger the browser into using "quirks mode" to render a page (eg. the absence of a doctype), where the handling of the markup deviates from accepted standards and instead renders according to earlier established practices on from old browsers.
XHTML is usually treated by the browser as slightly invalid HTML, but due to the usual presence of a doctype it is nevertheless rendered in standards-compliance mode.
The Most Important Differences:
XHTML elements must be properly nested
XHTML elements must always be closed
XHTML elements must be in lowercase
XHTML documents must have one root element[w3schools.com...]
W3Schools.com is also a good place to learn html online [w3schools.com] - and other web technologies as well.
I better find a resource for learning html 4.01 and not xhtml 1.0?
Link to the W3Schools HTML Tutorial [w3schools.com]
However, it was "Permitted" (by short-sighted fools) to be served as "HTML" when the mime type is designated as "text/html" - which in essence renders xhtml 1.0 as HTML ... with strange closing tags. Did anyone really see any point in that?
BUT! Internet Explorer, is incapable of understanding what the "application/xhtml+xml"� mime type is. So even properly serving XHTML is a recipe for potential disaster.
Most people who initially got fooled into thinking XHTML was the new and future HTML replacement (myself included), used the content-type header meta tag - "content - http-equiv="content-type" content="text/html;charset=utf-8".
And this is where the whole XHTML vs HTML nonsense broke down. Because only xhtml 1.0 is permitted to be served as HTML; XHTML 1.1 and future versions must properly serve it as "application/xhtml+xml" ... which is a content-type that IE doesn't have a clue about - so guess what it does? It blows up.
And the whole issue has resulted in massive confusion from/for beginners to/for stubborn professionals alike.
It has actually become such a hot potato, that were the debates held live and not in forums ... it would come to blows.
The bottom line is this ... use HTML 4.1 strict and you simply can't go wrong.
Don't even LOOK at the mess they are already making of HTML 5! Wait for them to get it right with HTML 5.1.
[edited by: tedster at 2:45 am (utc) on Nov. 26, 2007]
[edit reason] fix a character set issue [/edit]