Except for the obvious XML issues, is there any benefit at all in using XHTML 1.0 over HTML 4.01 for web design? I'm thinking there isn't, but I'd like to hear if anyone out there has a different opinion, and if so, why?
No. If you can't use the extensibility of xhtml, e.g. you have to support IE, there is no benefit. There is no harm either, for that matter. cheers, gary
the benefit is for your design, for search engine too, and for web standard, actually it's depend on your taste. However, web 2.0 term is also use xhtml
Actually, from a standpoint of design I can't see where it would matter one way or the other. There is nothing in XHTML that does not exist in HTML where design is concerned. As far as search engines are concerned, I doubt they even notice. I'm not aware of anything anywhere that says the search engines even look at the DOCTYPE for anything, they're concerned with content. Web 2.0? Well, when I start hearing or reading consistent descriptions or definitions for it I'll consider that. Actually, from what I can tell so far, web 2.0 is more of a functional operations statement than anything having to do with design or standards. HTML 4.01 is as current as XHTML 1.0, it is older, but still current as a standard. XHTML did not supplant or supersede HTML. What does support of IE have to do with the difference between HTML and XHTML? If your markup is valid it'll work fine either way. It's true that IE6 and lower have something of a problem with standardized code, but that's Microsoft's fault. In fact, on my current project I'm preparing to release an interim upgrade. In order to make everything work right and be as backward compatible as possible I've stepped it down to HTML 4.01 Transitional. The whole thing needs a complete rewrite from the ground up, PHP, HTML and CSS. Until then I just need it to work. The point is, when I do the build I'm wondering if there is any benefit of going XHTML 1.0 vs HTML 4.01 considering this particular project does not involve any XML.
I think, css in html 4, and xhtml 1, is very different, i mean very different in the result, you should try it by your self. However, if you use xhtml in IE, I think, you should define, !DOCTYPE correctly, this is example about doctype strict xhtml : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Brother, if you see the future of website, xhtml 1 and html4 will be replaced by html5,
No version of IE supports XHTML served as XHTML. ALL versions of IE have a problem with standardized code. That makes no sense at all. Transitional is for transitioning older web pages which may be using old, deprecated markup and for NO other reason. Why would you be using deprecated markup? Gary already answered this. There is no benefit unless you are serving the page as application/xml+xhtml and taking advantage of xhtml extensions which I'd bet you are not and most people aren't.
Does Microsoft even know what XHTML is? I've given up trying to figure out why they do things the way they do. I know they believe that *they* should be the standard by which the internet exists, but still haven't developed anything for it that is useful. Well, in my opinion anyway. Granted, but I have to say I don't have nearly as much trouble getting things to look right in 7 and 8 as I did in 6 and earlier. Yes, older deprecated code. You'll notice in my post I used the term "backwards compatible." This site has been around a LONG time and some of the code in there is pretty old. I had to do something to make everything work until I can do a proper rewrite of pretty much everything, which will necessarily include the html, css, php and even the database structures. I just don't have time to do it right away. I agree, but then I already knew that. I was just trying to figure out if there was anything else. Apparently there isn't. I'm aware of the difference in the result, but to tell the truth it's not that big a deal unless you're changing DOCTYPE from one page to the next. Also, I always use DOCTYPE correctly. Always.
Using either html or xhtml makes no difference to design. Nor, does it matter to search engines. Both html 4.01 and xhtml 1.0 are valid web standards. Neither more so than the other. Web 2.0 is about an interactive web with community involvement; for examples, see this forum or Amazon. It doesn't matter a bit which markup is used. No, it's not css applies equally well against any markup language that can be used to create a DOM. E.g. html, xhtml, xml, mathml, etc. The DTD is important in IE because it triggers standards mode. Else it would use too much non-standard rendering. The Doctor covered the html issue. cheers, gary
Depends on the version, doesn't it? XHTML 1.0 has many deprecated elements and attributes, but I think they were all dropped from XHTML 1.1.
XHTML1.1 is an XML application and is served as XML and is also broken up into several modules. It's a different animal than v1.0.