|
|
|
|
Thread title: To use xHTML or HTML? |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
06-17-2006, 04:43 PM
|
#1
|
Status: Sin Binner
Join date: Jul 2005
Location: Yorkshire, UK
Expertise:
Software:
Posts: 3,709
|
To use xHTML or HTML?
Sitepoint recently wrote an article about this and the main part was
That depends on who you ask. There are a number of technical issues with this question, which preclude a simple and short answer. In reality, the latest W3C recommendation with widespread support is HTML 4.01. Unless you actually need any of the features that XHTML offers over HTML, there is no technical reason to use XHTML.
In order to actually benefit from using XHTML, you really need to understand the fundamental differences between XHTML and HTML. Such a site will only be available to a small minority of the surfing population, however.
Some web designers and developers prefer XHTML's syntax rules over HTML's. By following certain guidelines, you can use this syntax without technically using XHTML at all (see below). There are a number of potential pitfalls with this approach, but it is a possible way forward for those who absolutely want to type <br /> instead of <br>.
For 'future-proofing' your documents, using a Strict doctype is more important than whether you use XHTML or HTML.
|
I always use xHTML strict simply because most clients want that, how about you guys?
|
|
06-17-2006, 04:44 PM
|
#2
|
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
Posts: 3,820
|
It'll be a long time before I move away from my XHTML 1.0 Strict doctype.
|
|
06-17-2006, 04:50 PM
|
#3
|
Status: Member
Join date: Dec 2004
Location: Australia
Expertise:
Software:
Posts: 413
|
Yes I do use xhtml and doctype is important too.
|
|
06-17-2006, 05:06 PM
|
#4
|
Status: Junior Member
Join date: Jun 2006
Location:
Expertise:
Software:
Posts: 56
|
xHTML strict because its more effiecent, cleaner and easier to look at .
|
|
06-17-2006, 05:11 PM
|
#5
|
Status: Sin Binner
Join date: Jul 2005
Location: Yorkshire, UK
Expertise:
Software:
Posts: 3,709
|
But we all know what we write isn't really xHTML?
|
|
06-17-2006, 06:59 PM
|
#6
|
Status: Junior Member
Join date: Jun 2006
Location:
Expertise:
Software:
Posts: 56
|
|
|
06-17-2006, 07:57 PM
|
#7
|
Status: Sin Binner
Join date: Jul 2005
Location: Yorkshire, UK
Expertise:
Software:
Posts: 3,709
|
Originally Posted by Mount Tropolis
And how is that?
|
Well the fact the only way to use it properly is to save it as .xhtml and that IE6 dosen't support XHTML?
|
|
06-17-2006, 08:40 PM
|
#8
|
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
Posts: 2,246
|
Originally Posted by Techno
Well the fact the only way to use it properly is to save it as .xhtml and that IE6 dosen't support XHTML?
|
and where did you hear this? xhtml is xml parsed as html hence the combining of the terms.
|
|
06-18-2006, 03:45 PM
|
#9
|
Status: Sin Binner
Join date: Jul 2005
Location: Yorkshire, UK
Expertise:
Software:
Posts: 3,709
|
Originally Posted by dereklapp
and where did you hear this? xhtml is xml parsed as html hence the combining of the terms.
|
http://www.sitepoint.com/forums/showthread.php?t=393445
Can I use XHTML with Internet Explorer?
No. Not really.
IE does not support the application/xhtml+xml MIME type, and will prompt the user to download the page if it's served as such. You can make IE recognise this MIME type through a registry hack, but it will still treat it as HTML.
If you need the XML features of XHTML, you can serve the document as application/xml. That is supported by IE, but XHTML's namespace is not, which means IE will see the document as generic XML. There will be no default style sheet, so you have to specify explicit rules for every element type (including display:block for all block-level elements).
You can, of course, serve XHTML markup as text/html, but as has been mentioned above that means the document will be seen as HTML with syntax errors.
Will IE7 support XHTML?
No.
|
|
|
06-25-2006, 02:41 AM
|
#10
|
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
Posts: 2,246
|
Originally Posted by Techno
Well the fact the only way to use it properly is to save it as .xhtml and that IE6 dosen't support XHTML?
|
just verifying i'm not making it. it's on the first page.
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|