-
Does IE8 support XHTML?
I just started reading a course on web design and the teacher forces us to use XHTML for all our assignments. I emailed and asked if it would be ok to use HTML instead since XHTML is not supported in IE but he said I must have an old version of IE. I tried to find some info but couldn't find anything good except for the wikipedia entry on XHTML which says that "IE doesn't support XHTML" but doesn't specify with version and doesn't show any source. Does anyone know what the deal actually is?
-
-
True XHTML is not supported in IE, I'm not sure about version 8. True XHTML should be served as application/xml+xhtml not as text/html as most of it is. If it were served as application/xml+xhtml many (probably most) pages written in it would be invalid and break. None would open in IE 7 or less, perhaps not in IE 8.
See your own link for more details:
http://www.webdevout.net/articles/beware-of-xhtml
Your teacher is a bit nuts, but teachers are allowed to be. Oddly enough, even though it is a poor coding practice, the XHTML DOCTYPE is really catching on, so in a way your teacher may be doing you a favor. It never hurts to learn how to code for XHTML, it is a bit different than HTML.
Does it matter whether you use strict or transitional XHTML? Does your code have to validate? I ask because transitional XHTML served as text/html will parse pretty much like HTML 4.01 transitional. As long as your teacher doesn't care too much about the fine points of validation, all you need to worry about are those pesky /> for tags that require them in XHTML. Oh, and make your scripts and stylesheets external, the only real option in XHTML unless you want to get into some pretty arcane commenting syntax.
Also be aware, people who are sold on XHTML can be very closed minded when told that their code is really being parsed as invalid HTML and error corrected by the browser, which is probably the biggest reason to avoid it.
IE has no problem with it per se when served as text/html which is how it must be if IE sees it at all. This applies to IE 8 as well, but you could Google that to see if IE 8 supports it as an application or not, which earlier versions definitely do not. IE 6 & 7 are still so widely used though, web pages need to be in HTML or at least parsed that way to be seen in them.
Oh, and here's another link that may be of interest:
http://www.w3.org/MarkUp/2004/xhtml-faq
Added Later:
Test Page:
http://www.robinlionheart.com/stds/x...on/xhtml%2Bxml
Whch IE 8 wil not load, it is true application/xml+xhtml
Last edited by jscheuer1; 01-12-2010 at 06:58 PM.
Reason: minor correction - add test page
-
The Following User Says Thank You to jscheuer1 For This Useful Post:
-
Thanks John. The problem is the teacher is one of those close minded people that you talk about. He didn't even mention what kind of XHTML we should use (transitional or strict or 1.1), only that it should validate (there are no meetings, all instructions are already posted online). I've already done most of the assignments and wrote them all in HTML 4.01 strict as I always do and used best coding practices, so the only thing I would technically have to do to "switch to XHTML" is to change the doctype and add self closing tags.
I could just do that and move on, but the reason I want to take this "argument" is because I want to make a change and the only way is to start at the teacher. He's pretty old and old-fashioned and I doubt he'll change the course so what I'll do is write everything is HTML and if he says I need to do it in XHTML to pass, I'll change to real XHTML that will not work in IE. If he then fails me because I didn't pass it as text/html because "it's supposed to be like that" (I'm sure he doesn't have a clue what that is), I'll just complain to the student administration.
-
-
The easiest thing would be to just give him what he wants, pass your course, and move on.
As I said, it never hurts to learn XHTML syntax, it is so widely used on the web. Some folks who might hire you once you graduate will be no better informed than this teacher is, some will. Hopefully at that point you will be able to tell the difference without offending those who are clueless, and still get the job if you want/need it.
Once you get into the IT department, even if the person who interviewed you was a jerk, and/or clueless, you may find kindred spirits.
On another front, if only for your own interest, try giving your XHTML coded pages the xhtml extension and see what various browsers make of them.
-
-
Arguing with your professor is a complete waste of time. Professors are frequently wrong, but this in no way means you can reason with them (in fact, the opposite) and the administration will be very confused about what "html" means. Perhaps you could go to the department supervisor, as they would know something, but beyond that just do what John says and pass the course. It's not like you can't use text/html. Just keep versions of the pages as you'd actually use them.
Edit:
The real issue here is bigger than any of this, though. XHTML is the future, and it is not actually yet supported (well). There will never be a next "HTML5" replacing 4, but instead something that includes XHTML instead.
It would be nice if the web would move forward and decide what to do with this and do it sooner rather than later. Until then everyone will be in the same position you are, choosing between something that is right and something that works, and something that should be and something that is.
I am in no way convinced by XHTML but if it were available now in a workable setup, then it would make life easier when starting a new site, learning standards, etc.
For example, what should you build a new site in? HTML4? That's the past, and in a few years it'll be old. Should every site be completely upgraded once XHTML actually catches on? Why not start now? Well, why not is simple-- it won't work now.
But of course doing the silent error correction method works pretty well, so I suppose XHTML served as broken HTML is in some ways the best solution, though incredibly awkward.
Last edited by djr33; 01-13-2010 at 08:51 AM.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
I know it could be a bad idea to try to convince the teacher about it, but I study this course in parallel with my normal studies, so it's not that important. Also, letting it be is not what I do. If I see something is wrong, I have to change it, it's just who I am. But we digress, the issue is about the standards.
To reply to your edit, I thought XHTML was dead? Didn't the W3C stop working on XHTML2 in order to concentrate on HTML5? I would say that is the future. My opinion is that we should use HTML4 with best practices (lowercase tags, quoted and maximized attributes, using optional closing tags (</p>) and all that other nice stuff). We should also use class names like "header" "section" and "aside" and then step by step, switch to HTML5.
On a side note, where is Twey?
-
-
Am I behind on things then? I looked up html5 quickly just to check what I was saying and it had info about xhtml within it.
Either way, I don't really care-- they should just pick one and move on.
If XHTML is dead, then that's great, in fact. It's always been annoying to code (self closing tags seem redundant to me) and more so to make work.
But in that case, I wish they'd just do it faster already and make a standard that works.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Yeah, Twey would probably be good for something like this. I'm not aware of XHTML being dead though. Even if it is like you say, I believe the HTML 5 isn't really ready yet and will then incorporate a lot of what was to be XHTML. That is if it is like you say. I get the impression that XHTML and HTML are going to remain separate (but with increased opportunities for combination), though I haven't seen anything recent on XHTML on the W3C. No working draft since 2006. However, I only did a limited search. And that (nothing recent) doesn't really mean anything anyway, other than perhaps things are getting fairly well sorted for XHTML. The HTML 5 specification (working draft 2010) references XHTML as though it is an existing and continuing language.
It appears IE can do 'true' XHTML, sort of:
http://www.w3.org/MarkUp/2004/xhtml-faq#ie
Perhaps worth playing around with, if you want to follow the teacher's rules and still show him something.
Last edited by jscheuer1; 01-13-2010 at 04:27 PM.
Reason: add link
-
-
Yeah, HTML5 does incorporate a lot of XHTML. For instance, self closing tags are optional and valid in HTML5, although I will never ever see the point of them. Maybe this site offers the best (or rather the straightest) answer to the question: http://isxhtmldead.com/
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks