it is a simple progression,
there is very little difference.
re: css a bunch of cool extra attributes
re: html a few extra tags to learn and no trailing slashes are required with 'unclosed' elements - and become much more symantic in your mindset if you weren't already
of course if you were extending the html by using other xml in your documents you can't do that of course. however there is an xhtml version of html if you require it.5
There is an xhtml version of html5? Would I find good information if I searched google on this?
Just curious, if you don't close an element, doesn't that interfere with the code? Say in the case of a list, shouldn't the list be closed?
I purchased two books from amazon, one is html5 and css3, the other is css3 specific.
I have been away from development for a bit, so this is all new to me as to where i should start back up again.
Having used xhtml strict, to me it seems strange not to close an element. I always validated on the xhtml strict and on my css.
Thanks for your reply topr8, I appreciate it greatly.
Like HTML, some elements do not need to be closed but, for readability, I always close mine.
XHTML is XHTML if you serve it as application/xml+xhtml. If you don't, then it's just tag soup and not real XHTML. I bet you don't.
Not sure what you mean application/xml+xhtml. If it isn't xhtml strict, why does it validate as such?
Hope you don't mind the questions.
If your XHTML page is served from the server with a mime type of text/html, then then you're not really serving XHTML, you're serving HTML. If your server is configured to serve the page with a mime type of application/xml+xhtml, then browsers (that support it) will treat it as XHTML.
You should read the thread Why most of us should NOT use XHTML [webmasterworld.com]. It's almost 7 years old, but it's still referenced often. :)
Your link title is misleading. That topic is why you shouldn't use XHTML and serve it as HTML and not why you shouldn't use XHTML.
There is only one sad reason to not use XHTML and that's search engines. Search engines might struggle to find their way through your page, especially if you use custom tags or XSL. If not for that, I would use XHTML exclusively for everything on the web.
The second post says:
It is suggested that XHTML delivered as text/html is broken and XHTML delivered as text/xml is risky, so authors intending their work for public consumption
should stick to HTML 4.01, and authors who wish to use XHTML should
deliver their markup as application/xhtml+xml
(emphasis added is mine)
In other words, if your page is intended for public consumption, don't use XHTML. If you DO use XHTML, you should be serving it as such (which will be problematic for public consumption).
Of course, that thread is nearly 7 years old... now authors should be publishing HTML5 instead of HTML 4.01.
|In other words, if your page is intended for public consumption, don't use XHTML. |
He doesn't say don't use XHTML for public consumption. His wording could be better there but, later, he does say this:
Which is the case since IE9 finally works with XHTML.
Authors who are not willing to use one of the XML MIME types should
stick to writing valid HTML 4.01 for the time being. Once user agents
that support XML and XHTML sent as one of the XML MIME types are
widespread, then authors may reconsider learning and using XHTML.
I don't see where he says that at all though I just scanned it quickly having read it years ago but the Executive Summary says this:
If you DO use XHTML, you should be serving it as such (which will be problematic for public consumption).
If you use XHTML, you should deliver it with the application/xhtml+xml
MIME type. If you do not do so, you should use HTML4 instead of XHTML.
So, again, there is no issue using XHTML and it's included in (X)HTML5. The only problem is search engines as I mentioned above.
|The only problem is search engines as I mentioned above |
No, the problem is search engines AND browsers older than IE9. :) If you're willing to exclude IE7 and IE8, that's your choice.
I wish I could exclude IE altogether but that's a different topic.
wow, thanks for all the information.
I'm interested in the xhtml5, and how this works.
You are right I'm not using the xml thing. I would be interested in the doctype to just test one of my pages with it that I have done as test pages while learning.
Does css3 work with the xhtml5? And would I still have to do reading on the html5. I have notice new elements (forgive me if I have the wrong term) such as canvas and others. Though not sure what the difference is between a div and canvas.
Sorry so long to reply, but I have a son with aspergers and we are trying to get him to become employed and it is taking up some time. Not to mention draining trying to get him to learn how to socialize. I'm sure an earlier diag before the age of eighteen would have been better, but it is what it is right now.
I do, however, want to get back to the level I was when I left, and i know it is going to take work to do this, and wish to do it the right way.
Do a search for "polyglot html" to find more information, and check out XHTML5 in a nutshell [blog.whatwg.org].
Yes, CSS3 works with XHTML5 (if your browser supports it), just as it would with HTML.
HTML5 added several new elements. A div (not new) is still a generic container. A canvas is used for drawing graphics (usually via script).
There's a good little primer called Dive into HTML5 [diveintohtml5.info] that has a lot of helpful info.
I wish I could exclude IE altogether but that's a different topic
Fotiman, Thanks for the search that you gave me, and also the xhtml5 in a nutshell. Also, thanks for the other link that you provided, I appreciate greatly your imput.