Internet explorer dispaly

At the moment your *.xhtml version is served as application/xhtml+xml and is well-formed the minimum requirement. But it isn’t actually valid markup! Though of course MS IE browsers; IE 8 and below won’t be able to display the content using said MIME (you’ll get a download prompt instead).

The file extension itself is mostly irrelevant when it’s on the server. My pages have: *.html, *.htm, *.php and *.xht extensions and they ALL get served as ‘application/xhtml+xml’ using content negation only to browsers that can accept.

In XHTML trying to set the MIME with META is pointless (unless the document is served as ‘text/html’ for backwards compatibility mode) since the user agent needs to know the content type before it starts parsing the response body.

You are getting DOCTYPE mixed up with MIME types. All mainstream browsers support ‘text/html’ and vanilla XHTML 1.0. No browser properly supports (X)HTML5 since it is mainly non normative and introduces a lot of new nonsense markup and thus is NOT backwards compatible.

You should be striving for using: XHTML 1.0 Strict; or HTML 4.01 Strict; since it does not allow all the deprecated elements and attributes from Transitional.

Now down to 4 errors; two are wrong use of span, and the others are incorrect coding of the links at the bottom ( target = blank is not recognised). Not quite sure why though. Thoughts anyone?

No, I’m not. The reason I’m sure I’m not, is that I have no idea what you are on about, hence I’ve not even considered it. :smiley:

The plan was to use XHTML 1.0 Strict, because that seemed the best combination of “modern” options, and backward compatibilty.
The main thing for me to work out first, before going any further, is the backward compatibility issue with IE8. As that still covers about 15-20% of the market, all the advantages of all clever options won’t make up for the loss of that segment if I can’t make my pages display properly on pre-Vista IE brosers.

Your comments, and those of some of the others, are waaaaaaaayyyyyy beyond my level. No doubt valid and true, but might as well explain in Chinese.

Ok - just don’t do it in future :slight_smile:

I suspect you can see the page in IE, because you use a version that is less than 6 years old; it runs fine on newer versions (don’t know the cut off date/year).

The page will view fine in IE6+ as I already mentioned and that’s going back 11 years. The extension you have used may will prompt old ie to download the filaeas Robert mentioned above. You should use .html and not .xhtm for your purposes.

The main reason for chosing Xhtml, is aiming to have various “versions” of my pages, depending on what platform is used e.g. pc, tablet, smartphone. I don’t want to run parallel pages or sites, and Xhtml seems to be best solution in this case.

Again this is mostly irrelevant as html4.01 is just as good and will always work for your purposes. You need to concentrate on well structured and logical mark up and robust css layout techniques. The doctype is a side issue as long as you are using a current valid strict doctype it won’t matter.

Then use this doctype:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

Then make sure you save your files as .html and they will work in IE back to IE5 and beyond. You don’t need to do anything else so forget about it until you actually need to understand the finer details of doctypes (and if you are just designing standard sites then you may never need to know anything more about it)

There will be no issues with ie6+ apart from the CSS bugs evident in those browsers.

Are you saying the fact that I can not open it in IE8 here, is definitely due to my computer?

As long as you have changed the extension to .html it will open.

If the page won’t work open for you then that’s another issue and we will need more info to debug further.

Took the x out of the suffix, and it opened in IE. Stick the x back in, and it opens in Firefox when I instruct to open in IE.

Why are you still talking about the .xhtml extension? Forget you ever heard of it and just use .html (or .htm) .:slight_smile: You don’t need to know anything about it at this stage. Look through all the threads in the forums and you won’t see a single one using .xhtml. You seem to have got caught up in something quite complicated that won’t be relevant to you unless you are in to hard core programming and other very advanced techniques.

Concentrate on the CSS and CSS layout techniques for now.

Like we said the extension with regards to when on the server doesn’t really matter: http://www.xhtmlcoder.com/beck/ uses *.xht extension though it could have equally been *.dog or an exotic *.Zebede extension I could get them all to render equally in your browser.

The extension DOES NOT always determine the MIME you’ll notice if you view those pages (online) using IE 8.0 or earlier you can still view them. Because the content negotiation is used; so MSIE gets ‘text/html’ instead and even IE 5.0 would understand that.

The markup grammar is XHTML in both cases and nearly identical. The only difference when served as ‘application/xhtml+xml’ the XML Parser is triggered and it is treated as an application of XML.

To me it sounds like you are talking about offline or download files. Like said unless you have a specific reason you should be safe with ‘text/html’ as most modern mobile devices can cope. In which case leave those XHTML Strict 1.0 files with the *.htm extension if you find it easier…

As Paul said typically applying mobile friendly CSS will work fine if you want the content to be optimally viewed on most modern mobile devices.

It seems that, at least at this stage, persuing Xhtml is more trouble than it’s worth.
Unless I find a miracle cure this week, I will abandon it and revert to html 4.01 with CSS3 whilst avoiding the use of any options that have compaitbility issues. Much of the advice givent in this thread is no doubt accuate and correct, but too far beyond my current capabilities.
Maybe when my site revamp to vs 3.0 is finished and it all looks a lot better than today, can I spend time on mastering the magic of Xhtml.

XHTML is basically a waste of time unless you have a specific need for it, which is very rare. But as has been said, there’s no problem using XHTML as long as you serve it up as text/html rather than application/xhtml+xml. That said, I agree that you are better off using HTML4 and upgrading to HTML5 when that becomes mainstream. (HTML5 will accommodate what XHTML does anyway.)