Jamie Mason wrote:
Hey,The correct content type or MIME type for an XHTML document is "application/xhtml+xml".
just a quick question, is the below the correct markup for a transitional XHTML document?
I thought the meta http-equiv was text/xhtml, so I've lost confidence in the rest of the code being correct also.
Thanks a lot! Sorry to always be the one with the menial questions.
Jamie Mason: Design
T: (01423) 700849
++++++++++++++++++++++++++++++++++++++++++++++++++++
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body> </body> </html>
Although I might add internet explorer doesn't understand it so you need to determine if the users browser accepts it.You can do this in PHP by writing:
<?php
if(strstr($_SERVER['HTTP_ACCEPT'],"application/xhtml+xml"))
header("Content-type: application/xhtml+xml");
else
header("Content-type: text/html");
?>I know you can also do it in the htaccess file if your running apache, I can't remember how though.
With regards to <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" /> that really wont do anything, not anything i have seen. I guess it can't hurt to put it in though. As far as I know Internet Explorer wont care about that.
Marc.
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************
