This is a discussion on "[SOLVED] HTML or XHTML" within the Web Page Design section. This forum, and the thread "[SOLVED] HTML or XHTML are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] HTML or XHTML
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] HTML or XHTML
Hi guys,
I have read the article about choosing the right doctype in newsletter, what i want to know that if i don't use xhtml then what will i lose ? Thanks...
__________________
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
#2
|
|||
|
|||
|
Re: HTML or XHTML
Well, do you mean Strict vs. Transitional or do you mean HTML vs XHTML?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#3
|
|||
|
|||
|
Re: HTML or XHTML
Nothing.
...except an "X". |
|
#4
|
||||
|
||||
|
Re: HTML or XHTML
Oooh I hear a big debate about tag soup coming along...no?
Generally, if you're not using any of the XML features with XHTML, HTML 4.01 Strict is perfectly suitable.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
#5
|
||||
|
||||
|
Re: HTML or XHTML
and neater code - the brawl begins
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#6
|
||||
|
||||
|
Re: HTML or XHTML
Well in my opinion, the code is as neat as the autor writes it.... You can have a compliant XHTML document that is bloated with unnecessary code and a HTML document that has been written without a single element in excess.
I always use XHTML due to the fact that it is a XML version of HTML. All of the HTML elements are still available but can also be parsed as XML due to the uniform structure required by such documents. I write applications with PHP and having all documents coded in XHTML allows me to use PHP's XML parsing functions to read it, parse it and manipulate it like any other XML document. As ASO says, if you don't plan to use the XML features there aren't any killer features to make one standard recommendation better than another. XHTML has addition benefits when it comes to accessibility and devices that don't use a standard web-browser interface. A correctly written XHTML document can easily be used to generate output on text-brailes devices and any program that can parse XML. Having said that though, HTML will also do the same. The difference is that XHTML by its recommendation requires a strict, properly formed layout whereas HTML is not quite as firm in this enforcement. Any compliant XHTML document will can be translated but this isn't the same for HTML. If you use HTML and find yourself slipping into lazy or messy practices, switching to XHTML is a good way of forcing yourself into correctly structured documents as your code won't validate any other way... Hope that helps a little.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Last edited by Rakuli; Dec 18th, 2007 at 13:13. Reason: spelling error :o |
|
#7
|
|||
|
|||
|
Re: HTML or XHTML
Thnx guys,
So what i understand now is that if i dont need xml then i should use html strict 4.01, right ?
__________________
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
#8
|
||||
|
||||
|
Re: HTML or XHTML
No it's nothing to do with XML besides the rules that (almost) ever element must be closed.
It doesn't matter whether you use XHTML or HTML just use a strict doctype
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#9
|
|||
|
|||
|
Re: HTML or XHTML
Quote:
As Alex said, the really important decision is to use a Strict doctype. And as Rakuli said, the quality of your code is unconnected to whether you use XHTML. XHTML has certain pitfalls, which I listed in the article (the need for content negotiation, problems with google ads, and the "invalid user comment breaks entire page" issue). All of these problems can be overcome. I don't find it to be worth the effort, given I have no use for XHTML over HTML. But if you are aware of the issues, there's nothing wrong with using XHTML. Assuming, of course, that you're serving it with the correct MIME type -- otherwise it becomes invalid HTML, which seems a little stupid, no? Last edited by MikeHopley; Dec 18th, 2007 at 09:18. |
|
#10
|
|||
|
|||
|
Re: HTML or XHTML
Ok, How you guys choose your doctypes ? i mean what factors are important for you to choose html or xhtml ?
__________________
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
#11
|
|||
|
|||
|
Re: HTML or XHTML
Quote:
My approach:
|
|
#12
|
|||
|
|||
|
Re: HTML or XHTML
Thanks Mike,
Now i think i got it !
__________________
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
#13
|
||||
|
||||
|
Re: HTML or XHTML
Quote:
I was all for HTML 4.01 - but - there's no winning. I have not met somebody who has not wanted XHTML in their site. People refer to it (HTML) as "old technology" - it's not, I know, but times do change and it's just like with everything. I can easily spot that XHTML is the way everything is going, so rather sooner than later. Thanks, Ed
Last Blog Entry: Happy New Year! (Jan 1st, 2008)
|