/    Sign up×
Community /Pin to ProfileBookmark

Which DOCTYPE To Use?

[QUOTE]

Why, on Earth, are you using XHTML Doctype and syntax? Are you to use XML files on it? I doubt. You should use common HTML strict DTD and syntax.

[/QUOTE]

Rather than hijack the thread the above was posted in to another poster, I thought it best to put this question in a thread of its own.

I have always been of the opinion that to a large extent it does not matter what DOCTYPE you use as long as you are consistent throughout a website and that the web pages pass the w3c validator for the chosen Doctype.

[B]For a few years now I have been coding in XHTML with a Strict DTD.[/B]

My typical web page header is:

[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[/URL]”>
<html xmlns=”[URL]http://www.w3.org/1999/xhtml[/URL]”>
<head>
<meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″ />
[/CODE]

I am happy to use this on commercial websites I build and I ensure all my web pages pass the w3c validator before passing the website to the client. (but I don’t spend time validating any web pages I post in forums like these as long as the functionality is correct)

I’m not looking for arguments or trying to tell others what Doctype they must use.

But I am curious as to why a few in these forums are so strongly opposed to XHTML.

Any thoughts or comments?

to post a comment
HTML

63 Comments(s)

Copy linkTweet thisAlerts:
@tirnaauthorMay 27.2010 — looks like most share my view.
Copy linkTweet thisAlerts:
@FangMay 27.2010 — It's a topic that has been covered many times and usually ends in a flame war
Copy linkTweet thisAlerts:
@tirnaauthorMay 27.2010 — ok sorry, didn't realise that ?

but I can understand judging by the original quote from another poster that I posted.

Maybe delete this thread if you think it could start a fight.
Copy linkTweet thisAlerts:
@KorMay 27.2010 — Simple: If you intend to handle XML files or XML objects, use XHTML. Otherwise, use HTML strict.

People use to believe that XHTML is the next level of HTML 4.01. [I]Well, it is not[/I]. The next level of HTML 4.01 is HTML 5:

http://www.whatwg.org/specs/web-apps/current-work/multipage/

The correspondent XML handling version will be probably X/HTML 5 or XHTML 5 (the working groups have not decided yet on the name ? ). Or they will give up, if they will manage to make HTML 5 to handle properly the XML objects.

As simple as that. XHTML [I]does not oppose[/I] to HTML. It is complementary. Moreover, when and if we will switch to HTML 5 +- XHTML 5, the Doctype problem will disappear, as the 5th level languages will renounce to use DTDs anymore ?
Copy linkTweet thisAlerts:
@FangMay 27.2010 — Maybe delete this thread if you think it could start a fight[/QUOTE]
Threads are never deleted. Other posters may wish to add to this thread and if a flame war starts it will be closed by a Mod.

Use the correct DTD for the document http://htmlhelp.com/tools/validator/doctype.html

xhtml v html
Copy linkTweet thisAlerts:
@tirnaauthorMay 27.2010 — [B]But I don't see any downside to using XHTML.[/B]

Now I'm not saying everyone must or should use XHTML. I still believe it's a matter of personal choice and what you are used to to some extent.
Copy linkTweet thisAlerts:
@KorMay 27.2010 — [B]But I don't see any downside to using XHTML.[/B]

Now I'm not saying everyone must or should use XHTML. I still believe it's a matter of personal choice and what you are used to to some extent.[/QUOTE]

It is not really a personal choice, it should be [I]a logical choice[/I]. A general principle of the efficiency (not only in programming) says :"use the proper tool to achieve the proper result". No more, no less.

In programming there is no place for "I like XHTML" or "I hate XHTML". It is only "I need XHTML" or "I don't need XHTML".
Copy linkTweet thisAlerts:
@tirnaauthorMay 27.2010 — A general principle of the efficiency (not only in programming) says :"use the proper tool to achieve the proper result".
[/quote]


I agree in general, but I don't see how XHTML is not a proper tool for building web pages.

So imo, selecting a doctype is a personal choice.
Copy linkTweet thisAlerts:
@KorMay 27.2010 — I agree in general, but I don't see how XHTML is not a proper tool for building web pages.

So imo, selecting a doctype is a personal choice.[/QUOTE]

Will all the respect, once again, [I]it should not be[/I].

I eat my soup with a spoon, and my steak with fork & knife. Sure, it is [I]your[/I] decision to eat [I]your[/I] soup using the knife, if you want that by all means, but let [I]me[/I] advice [I]the others[/I] not to. They might or they might not follow the advice; that is their problem, after all.

I have nothing against XHTML, as I have nothing against the spoon, the fork or the knife. But I like to use them for the exact purpose they were made for. I used XHTML in about half the sites I have made so far, anytime when I was to handle XML AJAX requests. But if I didn't need that, I have switched to HTML 4.01 strict. It is logical, not personal choice ?
Copy linkTweet thisAlerts:
@tirnaauthorMay 27.2010 — To use your analogy, how is using XHTML to build web pages (whether handling XML files and XML objects or not) like eating soup with a knife?

I just don't see how it is. I've used XHTML for a few years now on all my commercial websites and am happy to continue using XHTML.

I guess we'll just have to agree to disagree on this one.
Copy linkTweet thisAlerts:
@KorMay 27.2010 — Ok, ok... let's the matter drop ? It is not so important. It is important to use a Doctype, no matter which, and to code as strict as that DTD needs.

Except that very often the beginners use XHTML Doctype, but they don't know the particularities of the XHTML coding. [I]This[/I] is the reason for I advice them to use HTML if they have no serious reasons to use XHTML. ?
Copy linkTweet thisAlerts:
@FangMay 27.2010 — One error with xhtml, easily made with user input, produces the "screen of death"

html documents are smaller
Copy linkTweet thisAlerts:
@svidgenMay 27.2010 — One error with xhtml, easily made with user input, produces the "screen of death"

html documents are smaller[/QUOTE]


Here's my reasoning for having used xhtml in the past:

.. by using application/xml+xhtml I can ensure that I notice when my mark up breaks[/QUOTE]

Though, a month or two ago I glanced at the doctypes that yahoo and google use and discovered that they're both quite comfortable using the HTML5 doctype. Like any good developer, I followed the "recommendation" of the big players: I started converting to HTML5.

I still code my site in conformity to XML standards, of course. And, like Google and Yahoo, I ignore validation errors in favor of code that produces suitable results in all of my target browsers. And best of all, the doctype is designed to be semi-backward compatible [I]and[/I] it's [B]ridiculously[/B] easy to remember:

[code=html]<!doctype html>[/code]

Simple.
Copy linkTweet thisAlerts:
@kiwibritMay 27.2010 — Hmm. HTML5 is still in draft - so I am not using it yet. I also wonder how IE6 (still used by some of corporate sites for application legacy reasons) would handle it. Must admit that I hadn't noticed Google was using HTML5, though. That said, its page layouts are scarcely complex. I assume Steve Jobs has an issue with Adobe when he fails to support Flash with iPodTouch, iPhone and iPad - but we are drifting OT, here.
Copy linkTweet thisAlerts:
@svidgenMay 27.2010 — Hmm. HTML5 is still in draft - so I am not using it yet. I also wonder how IE6 (still used by some of corporate sites for application legacy reasons) would handle it. Must admit that I hadn't noticed Google was using HTML5, though. That said, its page layouts are scarcely complex. I assume Steve Jobs has an issue with Adobe when he fails to support Flash with iPodTouch, iPhone and iPad - but we are drifting OT, here.[/QUOTE]

Does it matter whether it's still in draft? Neither HTML nor XHTML standards are even close to having full cross-browser support. So, what do we really lose by using [I]another[/I] (more capable) doctype that isn't fully supported?

Also bear in mind, Apple and Gmail both use HTML5, both of which have more sophisticated layouts than Google's homepage.

(I was either mistaken about Yahoo or they've "suddenly" switched back to HTML 4.01. In my recent recollection, I've seen them using HTML 4.01 Strict, XHTML 1.0 Strict, and HTML5. So, I guess I'm not sure what to take as Yahoo's preferred doctype anymore ... )

Anyway:

but we are drifting OT, here[/QUOTE]

[I]Sort of.[/I] But, the OP places a good deal of significance in the decision. That being said, it's silly to limit the decision to 2 of [B]N[/B] choices, particularly when one of the unnamed choices may be "better." If the decision truly is important, it makes more sense to look up to successful companies that have made the decision. In particular, look up to companies whose business "[U]relies[/U]" on making the decisions [I][B]well[/B][/I].

The alternative, of course, is to look at a much larger sampling of companies and notice that most dot-com's fail for reasons [I][B]other[/B][/I] than their choice of [U]doctype[/U] ... though, in my opinion, the suggestion that doctype choice is insignificant is far more OT than bringing another doctype into the mess ?
Copy linkTweet thisAlerts:
@tirnaauthorMay 27.2010 — Regarding the "yellow screen of death", this is extracted from information on the w3.org website at:

[URL]http://www.w3.org/MarkUp/2004/xhtml-faq[/URL]

For anyone interested, there is a lot more interesting info on the

XHTML vs HTML debate at the above link


-------------------------------------------------------------------
[B][COLOR=blue]Why is it allowed to send XHTML 1.0 documents as text/html?[/COLOR][/B]

[SIZE=2]XHTML is an XML format; this means that strictly speaking it should be sent with an XML-related media type ([SIZE=3][COLOR=#008000]application/xhtml+xml[/COLOR], [COLOR=#008000]application/xml[/COLOR], or [COLOR=#008000]text/xml[/COLOR][/SIZE]). However XHTML 1.0 was carefully designed so that with care it would also work on legacy HTML user agents as well. If you follow some simple guidelines, you can get many XHTML 1.0 documents to work in legacy browsers. However, legacy browsers only understand the media type text/html, so you have to use that media type if you send XHTML 1.0 documents to them. But be well aware, sending XHTML documents to browsers as [COLOR=#008000]text/html[/COLOR] means that those browsers see the documents as HTML documents, not XHTML documents[/SIZE]

[SIZE=2][/SIZE] [/QUOTE]
[SIZE=2]-------------------------------------------------------------------[/SIZE]

[SIZE=2][/SIZE]

[SIZE=2] [/SIZE]

[SIZE=2][/SIZE]
Copy linkTweet thisAlerts:
@kiwibritMay 27.2010 — Does it matter whether it's still in draft?[/quote]

More liable to significant change than an approved version.
Copy linkTweet thisAlerts:
@svidgenMay 28.2010 — More liable to significant change than an approved version.[/QUOTE]

Fair enough. You use an in-draft doctype, you need keep an eye on revision. Still, a major revision will still leave you a good amount of time to adjust before many users' browsers receive a corresponding update. And since large, corporations are trusting the changes to be slow enough to act on in their complex applications, I wouldn't be worried about smaller organizations where responding to change requires less effort and fewer meetings between fewer people ...
Copy linkTweet thisAlerts:
@tirnaauthorMay 28.2010 — 
html documents are smaller[/quote]


That may be the case, but for an argument like that to have any weight, for me at least, the difference in file size would need to be quantified.

In my experience, based on the websites I have built, the difference in file size would be less than 1&#37;.

Therefore, the difference in file size would not be a sufficient enough reason for me to switch from coding in XHTML to HTML - although I accept it might be a good enough reason for others.

Some interesting reading for anyone interested in the XHTML vs HTML debate.

http://www.w3.org/MarkUp/2004/xhtml-faq
Copy linkTweet thisAlerts:
@kiwibritMay 28.2010 — Something like 17&#37; of browsers are still IE6. That matters to me because I design sites intended for business customers, and many of those are stuck on IE6. It's a pain. I avoid png, and have to have style sheets introduced by conditional statements, and Flash needs special handling - but by and large, sites designed in HTML 4.01 or XHTML 1.0 work fine. HTML5 would be pushing it, though. I hope it doesn't become accepted for a while until the stone-age browsers have finally gone.
Copy linkTweet thisAlerts:
@tirnaauthorMay 28.2010 — I'm always sceptical about browser popularity figures?

[B]Where is the data source you used to come up with 17% for IE6?[/B]

For what it's worth, I use the w3schools published figures as a ball-park guide only.

The figures in the link below, show that in April 2010, only 7.9% of users still used IE6

[URL]http://www.w3schools.com/browsers/browsers_stats.asp[/URL]

Some interesting reading for anyone interested in the XHTML vs HTML debate.

[COLOR=#660000]http://www.w3.org/MarkUp/2004/xhtml-faq[/COLOR]
Copy linkTweet thisAlerts:
@kiwibritMay 29.2010 — To be honest, I can't remember which site I pickled the data from. [url=http://techcrunch.com/2010/02/02/internet-explorer-browser-share/]TechCrunch[/url] shows IE6 share as 20&#37; in January 2010. On my main company site, IE6 had 16.2% of hits that month. In any case, even 8% would be more than enough to make sure my sites were IE6 compatible. Business is business.
Copy linkTweet thisAlerts:
@svidgenMay 29.2010 — To be honest, I can't remember which site I pickled the data from. [url=http://techcrunch.com/2010/02/02/internet-explorer-browser-share/]TechCrunch[/url] shows IE6 share as 20% in January 2010. On my main company site, IE6 had 16.2% of hits that month. In any case, even 8% would be more than enough to make sure my sites were IE6 compatible. Business is business.[/QUOTE]

Techcrunch's numbers are only relevant to [I]your[/I] site if your site's content, traffic sources, and functionality are highly similar to Techcrunch's.



For what it's worth, I use the w3schools published figures as a ball-park guide only.

The figures in the link below, show that in April 2010, only 7.9% of users still used IE6

[URL]http://www.w3schools.com/browsers/browsers_stats.asp[/URL]
[/QUOTE]


My comment about Techcrunch's stats also hold true for w3schools. The only stats that matter are [B]your[/B] user's stats. That being said, when deciding browser support for a new site, you can't help but use browser share stats from a site that either matches your niche or is totally trans-niche. I wonder if Google has their browser share stats posted anywhere ...


Something like 17% of browsers are still IE6. That matters to me because I design sites intended for business customers, and many of those are stuck on IE6. It's a pain. I avoid png, and have to have style sheets introduced by conditional statements, and Flash needs special handling - but by and large, sites designed in HTML 4.01 or XHTML 1.0 work fine. HTML5 would be pushing it, though. I hope it doesn't become accepted for a while until the stone-age browsers have finally gone.[/QUOTE]

There will always be people running outdated browsers. There will always be people clinging to their 386's who can't render an HTML document larger than a few KB in any useable fashion. And there will always be people who simply don't have computers, but still want to read your [I]mega awesome smoked fish recipe[/I].

But, the facts of the matter are simple. You can't design a site that reaches everyone. But, you [I]can[/I] design a site that reaches most internet users. And you [I]can[/I] do that with the html5 doctype.

The doctype itself is backward compatible. Whether you take advantage of the new tags is up to you. And to be blunt, there comes a point when you need to simply stop supporting a percentage of your users in favor of delivering the content and functionality you want to deliver. That's how technology moves forward. (leave old technology behind)

Granted, there's a limit to some vendors' push power: their users would rather find different software than upgrade. But, there's also a limit to how long vendors can be expected to support outdated systems.


and Flash needs special handling[/QUOTE]

I should note that not everyone has flash installed and enabled. And I find it difficult to take you seriously when you're using [I]another[/I] technology with its own versioning that at least 3% of users don't even have installed. And that percentage will increase as folks continue to buy Apple's mobile devices. And if we're concerned about business users who aren't allowed to upgrade past IE6 for security reasons, they're almost certainly not going to allow Flash enabled devices on the network. (Flash is security nightmare)

But returning to the main point, the topic of this thread is a false dilemma between HTML 4.01 and XHTML 1.0. See http://en.wikipedia.org/wiki/False_dilemma.
Copy linkTweet thisAlerts:
@tirnaauthorMay 29.2010 —  .....The only stats that matter are [B]your[/B] user's stats......[/quote]

I don't think it as black and white as that.

Yes, your visitors' browser stats are important, especially if you have a large number of visitors, so that you can make sure your web pages render correctly for their browsers. But when building a web site from scratch for a client with no previous user history and at best an assumed audience type, unless instructed otherwise I would create the web site to cater for the the most popular browsers according to the w3schools published figures. By default, I support IE8, IE7, FF3.x, FF2.x and the latest versions of Opera, Safari and Chrome. If an unsupported browser requests a web page, I set the FF3.x stylesheet and hope for the best ?.

[U]A side observation: [/U] It is encouraging, for me at least, that the comments made so far in this thread do not give me any reason to consider switching from coding in XHTML to HTML. (and I am not saying anyone must or should switch from HTML to XHTML).

Some interesting reading for anyone interested in the XHTML vs HTML debate.

[COLOR=#660000]http://www.w3.org/MarkUp/2004/xhtml-faq[/COLOR]
Copy linkTweet thisAlerts:
@svidgenMay 29.2010 — FYI: You sort of responded to a single statement out of context. And that's annoying.
Copy linkTweet thisAlerts:
@tirnaauthorMay 30.2010 — I didn't think I took your statement out of context unless I misinterpreted what you were saying overall.

If I did misinterpret, can you please clarify what you were trying to say.
Copy linkTweet thisAlerts:
@svidgenMay 30.2010 — I didn't think I took your statement out of context unless I misinterpreted what you were saying overall.

If I did misinterpret, can you please clarify what you were trying to say.[/QUOTE]


Not entirely sure how to clarify ...
Copy linkTweet thisAlerts:
@KorMay 31.2010 — A more reliable source for browsers' market share:

http://marketshare.hitslink.com/report.aspx?qprid=0

About HTML/XHTML: W3C groups are still trying to find a way to improve the HTML 5 mechanism which allows decentralized parties to create their own languages, typically XML languages, and exchange them in HTML5 text/html serializations. That could make XHTML useless. In fact W3C worked on "both ends" these years: for HTML 5 and for XHTML 2, even if the general consensus is that they should give up one of them, at a certain point. We'll wait and see ?
Copy linkTweet thisAlerts:
@KorMay 31.2010 — XHTML2 left to die:

http://www.w3.org/News/2009#entry-6601

http://www.zeldman.com/2009/07/02/xhtml-wtf/[/QUOTE]

Yes. And the official announce (diplomatically covered) lies on:

http://www.w3.org/2009/06/xhtml-faq.html

[I]"While we recognize the value of the XHTML 2 Working Group's contributions over the years, after discussion with the participants, W3C management has decided to allow the Working Group's charter to expire at the end of 2009 [COLOR="Blue"]and not to renew it[/COLOR]."[/I]

But [B]tirna[/B] loves XHTML much too much, so that he won't let it die so easy, will you, [B]tirna[/B]? :rolleyes: Let's make a petition: "Don't let XHTML die, pleeeease!" ?
Copy linkTweet thisAlerts:
@cootheadMay 31.2010 — Hi there tirna,

Why pretend that XHTML served as "[b]text/html[/b]" is XHTML?

If the content type is "[b]text/html[/b]" then it is, for all practical purposes, [b]HTML[/b], not XHTML.

Not pretending that the document is XHTML and instead using HTML4.01 makes the document

smaller, with no ill effects at all.

[b]Further reading[/b]:-
[list=1]
  • [*][url=http://www.sitepoint.com/forums/showthread.php?t=393445]Frequently Asked Questions About XHTML vs HTML[/url]

  • [*][url=http://www.webdevout.net/articles/beware-of-xhtml]Beware of XHTML[/url]

  • [/list]

    [i]coothead[/i]
    Copy linkTweet thisAlerts:
    @FangMay 31.2010 —  Let's make a petition: "Don't let XHTML die, pleeeease!" [/QUOTE]It won't die completely as html5 will support it, but will require being sent by the server with the correct content-type, i.e. not html/text.
    Copy linkTweet thisAlerts:
    @KorMay 31.2010 — It won't die completely as html5 will support it, but will require being sent by the server with the correct content-type, i.e. not html/text.[/QUOTE]
    Yes, I know. XHTML was a good step to a sort of standardization at the time, but I guess it is time now for another paradigm.

    On the other hand, in the world of the languages of data transfer, JSON became a good alternative to XML, so that we can not speak of XML "monopoly" these days ?
    Copy linkTweet thisAlerts:
    @kiwibritMay 31.2010 — The problem with HTML5 opr me is that it is not in a stable version - and no version of IE really supports it well. In fact Firefox can be pretty ropey, too. Now I suspect that Firefox will get itself up to speed - and I also think that Firefox users keep their browser up to date, so I don't think Firefox will be a problem for long. But for a b2b site, IE is a serious problem - it has to be allowed for - currently right back to IE6. I can see having to have not just separate style sheets for IE (which is what I do at the moment, brought in with conditional statements) but also separate html coding (maybe even separate pages). Pain.

    It'd be lovely if IE did not feature heavily with the business world. But it does.
    Copy linkTweet thisAlerts:
    @tirnaauthorMay 31.2010 — 
    ...........But [B]tirna[/B] loves XHTML much too much, so that he won't let it die so easy, will you, [B]tirna[/B]? [/quote]


    It's not a matter of me loving it. It's just what I am used to and until it becomes officially superceded and/or redundant then I will continue to code in it.

    As I said earlier, I am choosing to code in XHTML and I am not trying to convince others to change to it. In my original post I said I was curious as to why some in here are so strongly opposed to it and trying to find out is my intention for starting this thread.

    It's been an interesting discussion and I am happy that everyone is playing nicely, but up until now no-one has given me a convincing reason to switch away from XHTML.

    And personally, I can't think of a reason why it should be important to anyone whether l'il ol' me uses XHTML or not ?
    Copy linkTweet thisAlerts:
    @KorMay 31.2010 —  In my original post I said I was curious as to why [COLOR="Red"]some in here are so strongly opposed to it[/COLOR] and trying to find out is my intention for starting this thread.[/QUOTE]
    And I was told you at the very beginning that your theory is based on a false assumption. [I][COLOR="Blue"]No one in here is opposed to XHTML[/COLOR][/I]. Some in here might be opposed to the incorrect usage of XHTML, either by scope or by incomplete or wrong coding, which is definitely [I]something else[/I] ?

    I am a good (I dare to say) Bridge player. In Bridge we have a saying: "Better a poor system but very well played instead of a brilliant system, played awfully". In other words, I like very much a Bridge bidding system like [B]Precision[/B], or [B]Super Precision[/B]. But if my partner does not know that system very well, I prefer to play Natural native Bridge (no system at all) with him rather that provoking an endless mess up with a half-known and half played, even superior, system.
    Copy linkTweet thisAlerts:
    @tirnaauthorMay 31.2010 — sorry, my mistake ?

    "strongly opposed to it" should have been "strongly opposed to its usage".

    Whether it is correct or not to use XHTML is a matter of opinion imo ?

    I'm not convinced it is incorrect to use XHTML.
    Copy linkTweet thisAlerts:
    @KorMay 31.2010 — sorry, my mistake ?

    "strongly opposed to it" should have been "strongly opposed to its usage".

    Whether it is correct or not to use XHTML is a matter of opinion imo ?

    [COLOR="Red"]I'm not convinced it is incorrect to use XHTML.[/COLOR][/QUOTE]

    Who said so? I hate to repeat, but:

  • 1. For the one who needs to handle languages, codes and files from the XML family in his web project, XHTML is indispensable. Otherwise, HTML 4.01 strict [I]is more than enough[/I]. But who wants to use XHTML even for that, is free to do it, if he knows it very well.


  • 2. Beginners should learn first HTML, in order to understand what is XHTML later.


  • 3. XHTML is not opposed to HTML. Maybe XHTML was meant to be, the day he was born, but in time, in the real life, it slowly became rather a parallel language, complementary to HTML, not its substitute.
  • Copy linkTweet thisAlerts:
    @tirnaauthorMay 31.2010 — 

  • 1. For the one who needs to handle languages, codes and files from the XML family in his web project, XHTML is indispensable. Otherwise, HTML 4.01 strict [I]is more than enough[/I]. [COLOR=red]But who wants to use XHTML even for that, is free to do it, if he knows it very well.[/COLOR]

  • [/quote]


    I'm glad we finally agree on something ?

    As I said in an earlier post, choosing to code in XHTML is my personal choice to do so and I am not trying to convince anyone to switch from whatever doctype they normally use.
    Copy linkTweet thisAlerts:
    @KorMay 31.2010 — I'm glad we finally agree on something ?

    As I said in an earlier post, choosing to code in XHTML [COLOR="Red"]is my personal choice[/COLOR] to do so and I am not trying to convince anyone to switch from whatever doctype they normally use.[/QUOTE]

    Let's make things clear. I have never persuaded [I]you[/I] to use a doctype or another in your projects. But you have started this Thread like:



    Why, on Earth, are you using XHTML Doctype and syntax? Are you to use XML files on it? I doubt. You should use common HTML strict DTD and syntax.
    [/quote]

    Rather than hijack the thread the above was posted in to another poster, I thought it best to put this question in a thread of its own.
    [/quote]

    OK, I was the one who asked a beginner that, because he used an XHTML Doctype, but he missed the syntax.

    http://www.webdeveloper.com/forum/showthread.php?t=230271

    Should he have used a HTML Doctype and syntax, that problem would have not occurred, because he did not need the XHTML by all means. He has lost some time and nerves on that.

    So, I don't understand - why my question there affected [I]you[/I]? I didn't say that XHTML is wrong, I asked only why he chose to use a language whom syntax and tricks it was obvious he did not know. I hate to see people who use XHTML [I]by default[/I] because they think it is modern and trendy, but they don't bother to see what's about HTML and XHTML and how to code for XHTML. That is the real issue, at least for me. ?
    Copy linkTweet thisAlerts:
    @tirnaauthorMay 31.2010 — I think you might be under the misunderstanding this thread is about you. [B]It is not.[/B]

    If I wanted to make this thread about you, I would have mentioned in my first post that you were the author of the example quote I posted. I deliberately chose not to because the author is irrelevant. It was the reasoning behind the contents of the quote I am interested in as I mentioned in my 1st post.

    Yours was just the latest in a hand full I posts I have seen since joining a few months ago questioning the use of XHTML.

    This has been an interesting discussion, for me at least, but until XHTML becomes officially redundant or superceded or it gets to the stage where I need to do something on a web page that can't be done in XHTML, then I personally see no reason that would make it worthwhile for me personally to switch from using XHTML to something else.

    If other developers choose to use a different doctype, I have no issue with that. And as I said previously, I can't think of a reason why it would be important to anyone else whether li'l ol' me uses XHTML or not.
    Copy linkTweet thisAlerts:
    @aj_nscMay 31.2010 — I think the point Kor is trying to make is illustrated in your own quote:


    it gets to the stage where I need to do something on a web page that can't be done in XHTML
    [/quote]


    The question is, are you doing anything in your XHTML documents that [i][b]can't[/b][/i] be done with an HTML doctype? if the answer is yes, then XHTML it is and you've made a good and, more importantly, logical choice. If the answer is no, I don't know, or why switch when it works with XHTML? Then you might be, as I was guilty of doing for years, and as Kor states that lots of people are probably doing, using XHTML because you think it's trendy and modern, not because it adds something to your page.
    Copy linkTweet thisAlerts:
    @tirnaauthorMay 31.2010 — If you read back through my posts you will see that the reason why I continue using XHTML is because it is what I am used to and what I am comfortable using. I don't choose to use XHTML because it could be seen as being "trendy" or whatever else.

    I suspect that over the years 100% of the content in my XHTML pages could have also have been written in HTML but I chose not to and will continue not to for the above reason because I don't see any worthwhile reason for me to change from XHTML until one of my previously posted situations arise.
    Copy linkTweet thisAlerts:
    @Jarrod1937May 31.2010 — After being a silent observer for a while now i think i can properly summarize what each of your points are:

    Tirna - If the xhtml doctype is being used and is being served as text/html mime type, then it will be processed as html. While i am not using it for its xml properties it is still working properly for html output.

    Everyone else - If you're not using any of xhtml's xml properties and are only serving it as html then why not use one of the more proper choices that may suite your needs better, aka html 4/5 doctypes.

    Forgive me if i got something wrong above, i am not trying to put words in peoples mouths. I see each sides point. No one here is against xhtml but they're against using it when it is not needed. However, at the same time i can see how someone wouldn't care since xhtml served as html works perfectly fine. My advice would be, if you have an existing project that uses xhtml and serves it as html then go ahead and keep using it as it is perfectly fine. However if you're starting a project and you know you'll never need any of xhtml's xml properties, then you might as well choose a more fitting doctype. The more fitting doctype will work just as well and will allow for smaller code due to other doctypes being less strict in terms of markup.

    The gist of it is, choose the doctype out of logical reasoning and for appropriate reasons, not because you don't know any better.
    Copy linkTweet thisAlerts:
    @tirnaauthorMay 31.2010 — After being a silent observer for a while now i think i can properly summarize what each of your points are:

    Tirna - If the xhtml doctype is being used and is being served as text/html mime type, then it will be processed as html. While i am not using it for its xml properties it is still working properly for html output.

    Everyone else - If you're not using any of xhtml's xml properties and are only serving it as html then why not use one of the more proper choices that may suite your needs better, aka html 4/5 doctypes.

    [/quote]


    I think that pretty well sums up the state of play at the moment ?

    [U]edit:[/U]

    As you have in your last post, a few posters now have mentioned that html documents are smaller than xhtml docs. While I accept this is true in most cases, after not seeing any replies to my requests to quantify the reduction (on average) I still believe that based on my experience the size reduction would be less than 1&#37; and so consequently such a small reduction, on its own, does not have sufficient weight to justify me switching away from XHTML.
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — EDIT (removed)

    Interesting comic:

    [URL]http://www.smashingmagazine.com/2009/07/29/misunderstanding-markup-xhtml-2-comic-strip/[/URL][/quote]


    love it ??
    Copy linkTweet thisAlerts:
    @svidgenJun 01.2010 — EDIT (removed)

    Interesting comic:

    http://www.smashingmagazine.com/2009/07/29/misunderstanding-markup-xhtml-2-comic-strip/[/QUOTE]


    Precisely.


    After being a silent observer for a while now i think i can properly summarize what each of your points are:

    Tirna - If the xhtml doctype is being used and is being served as text/html mime type, then it will be processed as html. While i am not using it for its xml properties it is still working properly for html output.

    Everyone else - If you're not using any of xhtml's xml properties and are only serving it as html then why not use one of the more proper choices that may suite your needs better, aka html 4/5 doctypes.

    Forgive me if i got something wrong above, i am not trying to put words in peoples mouths. I see each sides point. No one here is against xhtml but they're against using it when it is not needed. However, at the same time i can see how someone wouldn't care since xhtml served as html works perfectly fine. My advice would be, if you have an existing project that uses xhtml and serves it as html then go ahead and keep using it as it is perfectly fine. However if you're starting a project and you know you'll never need any of xhtml's xml properties, then you might as well choose a more fitting doctype. The more fitting doctype will work just as well and will allow for smaller code due to other doctypes being less strict in terms of markup.

    The gist of it is, choose the doctype out of logical reasoning and for appropriate reasons, not because you don't know any better.[/QUOTE]


    Not quite. My point was was that we're creating a false dilemma altogether. There are more doctypes to choose from (well, at least one). And in reality, it doesn't matter a great deal which you choose. But, whatever your markup flavor, you can use the [B]html5 doctype[/B] (the notable option that was left out of the n-lemma) and your document will [I]just work[/I].

    As the comic that aj_nsc posted clearly states, whether you prefer to code based on SGML or XML (HTML or XHTML) you can use the HTML5 doctype. So, if this thread really had [I]anything[/I] to do with determining the ideal doctype (it doesn't), it would probably be determined to be HTML5 (<!doctype html>) because it is backwards compatible.

    However, considering that determining the ideal doctype is decidedly not the point of this thread, I'm curious as to why the OP continues to moan about his/her choice of doctype.

    Honestly, if you're not trying to convince someone, why do you keep posting? (that's not rhetorical)
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — 

    ........I'm curious as to why the OP continues to moan about his/her choice of doctype.

    Honestly, if you're not trying to convince someone, why do you keep posting? (that's not rhetorical)[/quote]


    I'm not moaning about choosing to code in XHTML. I'm actually quite happy to continue coding in XHTML for the reasons I posted earlier ?.

    [B]Asking me why do I keep posting is a bit like me asking you why then are you asking me a question of which I assume you want a posted reply[/B] ?

    I post because like everyone else, I have a right to reply and/or to make comments where I feel I can help. ?
    Copy linkTweet thisAlerts:
    @svidgenJun 01.2010 — I post because like everyone else, I have a right to reply and/or to make comments where I feel I can help.[/QUOTE]
    But, you're [U]not[/U] being helpful. You repeatedly defend your choice of XHTML by calling it [I]a personal choice[/I] (like a religion?), which primarily serves to show that your [I]own[/I] opinion on the matter is irrelevant. The premise that it's a matter of choice renders [B]everyone's[/B] choice on the matter equally irrelevant, again, [I]including your own[/I]. In which case, starting a thread like this is just inane.

    So, you have failed to show us why it comes down solely to a matter of opinion. The counter-argument is that the decision is not solely a matter of opinion and can be made logically:

    [B]HTML[/B] - smaller file size (more savings that you've admitted), more forgiving syntax, and doesn't delude you into thinking your document will always be parsed as XML

    [B]XHMLT[/B] - strict syntax, easily generated and/or read with XML processor, strict rules are better for beginners to learn, some might argue that strict rules are just always better

    [B]HTML5[/B] - pick either the advantages of HTML and XHTML depending on your needs, start using new HTML features to spice up your pages, and backward compatibility

    [B]Matter of Opinion[/B] - <!-- please insert a rationale for believing that there is no logical basis for picking doctype -->

    The wild notion that you started this thread to [I][B]help[/B][/I] is just asinine without at least providing somewhat logical reason--preferably more than one.

    That being said, if it is your [U]preference[/U] that your documents adhere to a strict [XML] syntax for the sake of internal consistency and/or easy handling by XML parsers and producers, that's fine. That's an OK preference. But a [I]doctype[/I] is not a valid preference -- [B]a doctype is the end-result of [I]other[/I] preferences[/B]. And this is something you've failed entirely at mentioning or even [I]hinting[/I] at.

    And [B]that[/B] is destructive--[I]not helpful[/I]. [B]That[/B] is why no one is agreeing with you. And [B]that[/B] is why I am annoyed with you for both starting and continuing to post in this thread.
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — 

    .....So, you have failed to show us why it comes down solely to a matter of opinion. The counter-argument is that the decision is not solely a matter of opinion and can be made logically:..........

    [/quote]


    That's all very well. Everyone is entitled to their opinion.

    I still maintain that, for me at least, it is a matter of opinion on which doctype I choose to use because like everyone else I am free to choose whatever doctype I like as long as it meets my needs. The actual process in my choosing what doctype to use is up to me.

    Then it is up to others to judge, if they like, whether my , or anyone elses', choosing to code in XHTML is logical or not - and I have no issue with that ?

    If somebody's opinion is that my coding in XHTML is totally illogical, inappropriate or unnecessary, that's fine. But unless I see some verifiable significant benefit in switching away from XHTML then I won't.

    I'm yet to see any definitive reference anywhere which proves beyong doubt that one doctype is better than another for all cases and that is because there isn't one. [B] I have only seen peoples' opinions on what they believe should be the appropriate doctype to use.[/B]

    The purpose for me starting this thread was to get feed back on why some are strongly opposed to what they perceive as an incorrect usage of XHTML. I appreciate the views of others, but no-one has given me a reason that would make it worth my while to switch from coding in XTML thus far.
    Copy linkTweet thisAlerts:
    @KorJun 01.2010 — but [COLOR="Red"]no-one has given me a reason[/COLOR] that would make it worth my while to switch from coding in XTML thus far.[/QUOTE]
    You are funny ? Really. But [I]no one wants to give you a reason[/I] to switch from coding in XHTML. As Marx Groucho said once (and he quoted an older saying of James Hall, if I well remember): "You are barking up the wrong tree" ?
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — You are funny ? Really. But [I]no one wants to give you a reason[/I] to switch from coding in XHTML. [/quote]

    that's ok because I have never asked for it ?

    when I said

    [COLOR=black][COLOR=black].........but no-one has given me a reason that would make it worth my while to switch from coding in XTML thus far.....[/COLOR][/QUOTE][/COLOR] I was merely making an observation after reading through the comments from various posters in this thread and not asking for a reason

    [B]For the sake of completeness[/B], here is the complete sentence I posted and not the part sentence you quoted. The complete sentence, imo, makes it clear I wasn't asking for a reason but making an abservation based on the feedback posts in this thread.

    The purpose for me starting this thread was to get feed back on why some are strongly opposed to what they perceive as an incorrect usage of XHTML. I appreciate the views of others, but no-one has given me a reason that would make it worth my while to switch from coding in XTML thus far.[/QUOTE]
    Copy linkTweet thisAlerts:
    @svidgenJun 01.2010 — So, you started this thread to get some feedback regarding your perception that others are hostile over your choice of doctype. We're (some of us) trying to give you an answer. However, rather than taking a moment to comprehend the explanation, you're getting defensive and assuming that we're trying to get you to switch doctype.

    Sure. There may be some interleaved suggestions here (like "use html5"), but the main point is that there are good reasons to pick a doctype. You're not required to have chosen a doctype for one of those reasons. But, you should expect some hostility if you make a [perceived] doctype recommendation without a justification--preferably a good one. Because the differences in doctype are not always trivial.
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — So, you started this thread to get some feedback regarding your perception that others are hostile over your choice of doctype.

    [COLOR=red]This is simply not true. If you look back at my original post you will see that I used an anonymous quote (which Kor later owned up to being the author) [B]that was not aimed at me at all[/B]. [U]I don't feel a sense of hostility towards me personally at all over my coding in XHTML[/U] (maybe I've just built up a thicker skin over the years ? ), but it's obvious some are opposed to the general inappropriate use, as they perceive it, of XHTML in general.[/COLOR]


    We're (some of us) trying to give you an answer. However, rather than taking a moment to comprehend the explanation, you're getting defensive and assuming that we're trying to get you to switch doctype.

    [COLOR=red]Not true - I appreciate the comments made in this thread and some of the info in the links others have posted have provided food for thought for the future[/COLOR]

    Sure. There may be some interleaved suggestions here (like "use html5"), but the main point is that there are good reasons to pick a doctype. You're not required to have chosen a doctype for one of those reasons. But, you should expect some hostility if you make a [perceived] doctype recommendation without a justification--preferably a good one.

    [COLOR=red]I haven't made any recommendations on which doctype to use. I have consitently posted in this thread saying that I am happy to continue coding in XHTML and that I am not trying to get anyone to change the doctype they are comfortable using.[/COLOR]

    Because the differences in doctype are not always trivial.[/quote]


    ..
    Copy linkTweet thisAlerts:
    @KorJun 01.2010 — Hey, I like it. ? The debate turned to a semantic zone: has or has not [B]tirna[/B] asked for a reason to switch from coding in XHTML.

    As long as you are [I]not[/I] amongst those who use incorrectly XHTML, we are charged to assure you that you are not a subject of that "strong opposition to what they [aka us] perceive as an incorrect usage of XHTML" :rolleyes:

    Thus, as we learned at the Formal Logic classes: either you think you may use incorrectly XHTML or, more likely, you think that [I]we[/I] may think that you are using incorrectly XHTML. [B]Tertium non datur[/B].

    Don't worry, we do believe you, and we are ready to produce a public statement: "We all agree [B]tirna[/B] uses correctly XHTML."

    Is it enough? ?
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — From my point of view, you are totally free to post "We all agree [B]tirna[/B] uses correctly XHTML." (as per your post) or something like this:

    "We all agree tirna is totally wrong in blindly using XHTML and has no idea what he is talking about..."

    and whatever else you would like to choose to say about me because I cannot see how it can be of any significance or consequence to me at all ? what you think about me personally and whether I use XHTML or not.

    I stated my reasons for continuing to code in XHTML and haven't tried to change others' choice of doctype. As I have already said, I have got some really good feedback and info in this thread as food for thought but currently still have no reason to switch away from XHTML ?
    Copy linkTweet thisAlerts:
    @KorJun 01.2010 — I like this part of: "[...] and has no idea what he is talking about" ?

    Ok, no offense; just kidding.?


    I stated my reasons for continuing to code in XHTML
    [/quote]

    Go ahead. No one has anything against, if you know what I mean. Strong will. I like it.

    and haven't tried to change others' choice of doctype.
    [/quote]

    Nice of you. Good hearth. I like that, too.

    Bon. So, as we all said almost everything which was to be said about the matter, I suggest you all to close and end the game here, and let the Posterity to judge us all. ?
    Copy linkTweet thisAlerts:
    @aj_nscJun 01.2010 — Get back to the original post here. I think it has gotten way off topic. You wanted to know why it appears to you that most people on this forum are against XHTML. So here's your answer:

    Nobody is against it.

    What we (and this has been stated in at least 8 different posts in this thread) are against doing is, for the purposes of using a simple explanation, "stuff without logical reasoning."

    We're [b][i]NOT[/i][/b] trying to get you to change, and you are more than correct in that nobody on here could care any less in what doctype [b]you[/b] use.

    However, as I found out just a few hours ago, it's apparently better to use the HTML5 doctype because you can pretty much write stuff however you damn well please and it will be valid as the doctype is backwards compatible.

    So because developers, (not designers) as a rule, like logic, what's your logic for using XHTML in your sites?
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — 

    Nobody is against it.

    [/quote]



    This point was already raised earlier by another poster and it was clarified. We are starting to go round in circles now.
    Copy linkTweet thisAlerts:
    @KorJun 01.2010 —  what's your logic for using XHTML in your sites?[/QUOTE]
    Oh, my, not again! ? Now we will be told, for the twelfth time, or so, the story of "I do that because I want to" ? Man's will, eh... Can't beat it, right?! ?
    Copy linkTweet thisAlerts:
    @tirnaauthorJun 01.2010 — I

    Bon. So, as we all said almost everything which was to be said about the matter, I suggest you all to close and end the game here, and let the Posterity to judge us all. ?[/quote]



    sounds fair enough to me ?

    see you around in the soup .

    cheers ?
    Copy linkTweet thisAlerts:
    @svidgenJun 01.2010 — This thread is indescribably amazing.

    Also amazing is the alarming rate at which it's still receiving posts ...
    ×

    Success!

    Help @tirna spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...