• 0

HTML 4.01 -> XHTML 1.0 -> XHTML 1.1 -> HTML 5 -> ?


Question

It seems a bit confusing as to which web standard we should be using for an average website these days.

Back in the days of HTML 4 and HTML 4.01 it was a simple decision between Frameset, Transitional or Strict. Choosing between these simply depended on what sort of site you were building but we were encouraged to try to build a Strict site so that we would have the best browser cross-compatibility (with sensible browsers anyway... IE6 I'm looking at you...).

When XHTML 1.0 came along it was basically the same thing as HTML but implemented using XML. The decision was much the same: Frameset, Transitional or Strict, and once again, we were encouraged to use Strict where possible. It seemed like XHTML was the way forwards and I, along with many other web developers, began coding all my sites using XHTML instead of HTML.

XHTML 1.1 took this one step further by eliminating support for the Frameset and Transitional DTDs. This seemed like a logical progression because ever since HTML 4.0 we had been encouraged to create more strictly formatted web pages.

However, now with the introduction of HTML 5 we seem to be going backwards... Sure, HTML 5 introduces loads of application oriented structures which is great, but why couldn't they just do it in XHTML? Why not create XHTML 2.0 with all the new things they've introduced in HTML 5 rather than confusing us by going back to the old way of doing things in HTML.

Am I supposed to change all my sites from XHTML 1.1 to HTML 5 now in the interests of progress? And will XHTML 2.0 basically be to HTML 5 what XHTML 1.0 was to HTML 4?

What is the reasoning behind continuing to develop HTML when XHTML is still clearly the future?

/rant :laugh:

Link to comment
https://www.neowin.net/forum/topic/875818-html-401-xhtml-10-xhtml-11-html-5/
Share on other sites

16 answers to this question

Recommended Posts

  • 0

It seems a bit confusing as to which web standard we should be using for an average website these days.

Back in the days of HTML 4 and HTML 4.01 it was a simple decision between Frameset, Transitional or Strict. Choosing between these simply depended on what sort of site you were building but we were encouraged to try to build a Strict site so that we would have the best browser cross-compatibility (with sensible browsers anyway... IE6 I'm looking at you...).

When XHTML 1.0 came along it was basically the same thing as HTML but implemented using XML. The decision was much the same: Frameset, Transitional or Strict, and once again, we were encouraged to use Strict where possible. It seemed like XHTML was the way forwards and I, along with many other web developers, began coding all my sites using XHTML instead of HTML.

XHTML 1.1 took this one step further by eliminating support for the Frameset and Transitional DTDs. This seemed like a logical progression because ever since HTML 4.0 we had been encouraged to create more strictly formatted web pages.

However, now with the introduction of HTML 5 we seem to be going backwards... Sure, HTML 5 introduces loads of application oriented structures which is great, but why couldn't they just do it in XHTML? Why not create XHTML 2.0 with all the new things they've introduced in HTML 5 rather than confusing us by going back to the old way of doing things in HTML.

Am I supposed to change all my sites from XHTML 1.1 to HTML 5 now in the interests of progress? And will XHTML 2.0 basically be to HTML 5 what XHTML 1.0 was to HTML 4?

What is the reasoning behind continuing to develop HTML when XHTML is still clearly the future?

/rant :laugh:

XHTML was a failure for web and layout (there's little you need that for compared to HTML 4, and IE still doesn't support the standard properly due to not supporting application/xml+html). I think W3C may not be that open about it, but I think the inofficial stance is now at least that the forthcoming XHTML 2.0 is for document structure (as in not the web, but generic documents), while HTML 5 for the web and presentation. When W3C made this distinction, that let them do a lot more for the web than they would have been able to with XHTML 2. CANVAS, VIDEO, AUDIO as major examples, but there is more than this too. Much more.

Think of HTML 5 as a standard with a purpose: layouting websites and providing user interaction for the modern web. While XHTML 2 is for more abstract stuff.

  • 0

I don't like how the comic said that XHTML will live on through HTML5. Yea, it allows for strict syntax, but so did HTML4. It's still pointless if sloppy coding is allowed, you're still going to have a plethora of different ways the same document could be syntactically "styled", making it just as difficult to read/parse and by extension to learn. I just hope that by the time everyone starts using HTML5 the competent early adopting developers would already have set an industry standard to use strict syntax.

  • 0

I've found, rendering wise, IE (read: IE7, IE8 is a step up) plays better with XHTML 1.1 over the others, that being said I've meet others who say the opposite, so i donno. Changing from XHTML1.0 Transition/Strict has sometimes pulled IE out of quirks mode ( why? WHY? o_0 ) As it stands now I build all sites to XHTML1.1, ( I also do HTML4 if the page might be sent as an email/newsletter ).

I used to revert back to XHTML1.0 Transitional for sites that need the Document.Write() function in JS, but I found a js to get around that a while ago, so that killed that issue right there..

In the end as the comic says, it's all personal preference. HTML4 irks me, I can't stand it. If I am working on a site that was done it in I will go out of my way to make it XHTML1.1. ( OC much ? Yes, I am, thanks for noticing :) )

  • 0

It's a bit confusing, but the answer is HTML5 is the future of HTML and XHTML.

Most XHTML sites aren't actually XHTML, they're HTML with self closed tags (view the source for this page, even though the doctype says it's XHTML 1.0, the page is treated as HTML). The actual important bit is the mime type, which tells the browser to use an XML parser or a HTML parser. The doctype means nothing, it's solely there to actually trigger standards mode (vs. quirks mode or almost standards mode)

HTML5 unifies it a bit, under HTML5 all elements are in the XHTML namespace (so namespace aware functions work fine), and the parsing is the same between XML and HTML. A valid HTML5 document will parse properly with a HTML mime type or a XML mime type.

Edit: As for XHTML2? It's dead, you won't be seeing it used on the internet, or probably even offline.

  • 0

it's still stupid, typical w3c bureaucracy. I don't care about the name, xhtml of html, but at least make sure it's mandatory to serve and parse it as xml. That would result in faster browsers and less confusion

It would result in a standard that everybody ignores. I'm also willing to be that an unencoded ampersand 'blowing up' a web page with a yellow screen of death will result in a lot more confused users than the possibility of a missing word or space in a paragraph.

  • 0

I tend to use XHMTL 1.0 Strict with Text/HTML content type (since IE doesn't support true XHTML with the Application/XML+HTML content type) simply for the fact that I find that I prefer self-closing tags and the rules that the standard dictates (i.e. XML rules such as lower case attributes, quoted attr. values, etc). I used to use the XHTML 1.1 doctype tag, but abandoned it due to the fact that its impossible to comply with the standard (cannot use the XML+HTML content type because of IE).

I want to, but haven't adopted HTML 5 yet simply for the fact that you can't use the semantic tags yet due to browser issues. (FF2 doesn't cooperate with them properly, IE needs JS hacks to use them), and thats too many hacks for me simply to make a browser render a page. IE also doesn't support most (all?) of the new content tags like <video></video>, so you'd still need to serve up flash for IE, somewhat defeating the point.

In the end its your choice, a lot of people still opt for HTML 4.01, but equally as many opt for XHTML, its just whatever syntax you prefer. Some people like to self-close their tags (XHTML), and others like to capitalize their tags (HTML 4.01).

  • 0

Self closed tags in HTML is technically a syntax error.

So it might be "cleaner", but it's actually messier to the browser and invalid.

Its definitely valid XHTML though. Short of older browsers' issues with self-closing tags, how is it any harder for a browser to parse? Technically it should be easier since XHTML requires that all tags be explicitely be closed, whereas HTML allows things like paragraphs, table rows and table cells to be "auto-closed" by the browser.

  • 0

It may be XHTML, but since you're sending it as HTML it's being parsed as such.

Edit: In XML mode <p /> is a self closed paragraph tag, in HTML mode <p /> is an unmatched opening paragraph tag, with a forward slash in it.

Edit 2: And according to HTML5, <p /> is a self closed, empty paragraph in HTML and XML mode, mainly for people who do "XHTML sent as HTML".

  • 0

It may be XHTML, but since you're sending it as HTML it's being parsed as such.

Edit: In XML mode <p /> is a self closed paragraph tag, in HTML mode <p /> is an unmatched opening paragraph tag, with a forward slash in it.

Edit 2: And according to HTML5, <p /> is a self closed, empty paragraph in HTML and XML mode, mainly for people who do "XHTML sent as HTML".

The first edit is actually invalid XHTML syntax, since the XHTML rec states that:

"Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />)."

Given that, if you use a self-closing paragraph, you're breaking both HTML and XHTML rules (excl. HTML5, which I haven't looked at properly yet). The recommendation also states that valid XHTML can be sent as either text/html or application/XML+HTML. At the end of the day though, the variation between strict HTML and strict XHTML is almost nil. The recommendation only states 12 variations between XHTML 1.0 and HTML 4.01, and that is simply things like lower-case tags, stricter whitespace definitions, self-closing tags, and other small rules, all things that don't break compliance with HTML 4.01 (aside from the self-closing slash, and the extra attributes, but any half-decent browser would ignore unknown attributes anyway), but enable it to be almost compliant XML (except for the DOCTYPE tag, which has been all but nuked in (X)HTML5).

  • 0

The first edit is actually invalid XHTML syntax, since the XHTML rec states that:

"Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />)."

Given that, if you use a self-closing paragraph, you're breaking both HTML and XHTML rules (excl. HTML5, which I haven't looked at properly yet). The recommendation also states that valid XHTML can be sent as either text/html or application/XML+HTML. At the end of the day though, the variation between strict HTML and strict XHTML is almost nil. The recommendation only states 12 variations between XHTML 1.0 and HTML 4.01, and that is simply things like lower-case tags, stricter whitespace definitions, self-closing tags, and other small rules, all things that don't break compliance with HTML 4.01 (aside from the self-closing slash, and the extra attributes, but any half-decent browser would ignore unknown attributes anyway), but enable it to be almost compliant XML (except for the DOCTYPE tag, which has been all but nuked in (X)HTML5).

Not quite true. Section C is informative, which means that it "is not required for conformance but contributes to the correct use and implementation of the specification."

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Im in Ohio, and my VPN endpoint is in Boston. If that helps, it does happen both on and off the VPN. and again only in Edge.
    • It is such a shame. I used to really respect Neowin's articles.
    • So.... slower fixes and slower security updates are preferred? I mean, there is no goldilocks zone here until it can literally update without ever needing a restart, and even then I'm sure someone would complain.
    • [New Deal] Save 73% on a lifetime EbookMagic Starter Plan by Steven Parker Today's highlighted Neowin Deal comes via our Apps + Software section, where you can get a lifetime subscription and save 73% on a lifetime EbookMagic Starter Plan. EbookMagic helps turn your ideas into complete, professionally formatted ebooks without spending weeks writing, editing or designing. Simply enter your title, genre and key details, and EbookMagic creates structured content, polished layouts and a custom cover in just minutes. Instead of juggling separate writing tools, formatting software and cover generators, EbookMagic handles the entire ebook creation process in one place. Generate content, customize your book and export ready-to-use files designed for publishing, sharing or personal projects. EbookMagic Lifetime gives aspiring authors, creators and entrepreneurs the flexibility to build, publish and scale projects over time without ongoing subscription fees. Whether you're building lead magnets, creating educational resources or starting your self-publishing journey, EbookMagic simplifies the process and helps bring ideas to life faster. AI-Powered Ebook Creation AI Writing Assistant: Transform prompts & ideas into complete ebook content. 12 Professional Writing Styles: Write using multiple styles and tones. Author Style Mimicking: Adapt content to preferred writing styles. Personalized Cover Generator: Produce custom ebook covers automatically. AI Audiobook Creator: Convert your books into professional-sounding audiobooks using a variety of realistic AI voices (1 audio book included). Built to Help You Create Faster Lightning Fast Creation: Build complete ebooks in minutes. Target Audience Optimization: Tailor content to specific demographics and reader preferences. Intelligent Chapter Structure: Automatically organize chapters and generate a table of contents. 15+ Genres Supported: Create fiction, non-fiction, business, romance, self-help and more. Quality Assurance: Improve readability and engagement with built-in content optimization. Convert to Interactive Books: Transform standard content into interactive experiences. 57 Major Languages Support: Produce ebooks across supported languages. Ready for Download & Publishing Ready for Sale: Create professional books that can be published and sold on Amazon KDP and other major publishing platforms Kindle & Print-Ready Formats: Export files prepared for publishing. No Watermarks: Create cleaner deliverables for publishing. Commercial Usage Rights: Sell or publish your ebooks. Built-In Editing Tools: Make edits before export. What You'll Get 5 Ebooks per month Each generated ebook can support up to 500,000 words per book. Up to 50 cover generations 12 professional writing styles Author style mimicking Personalized Cover Generator Convert to Interactive Books Multiple languages support Kindle & Print-ready formats Commercial usage rights No watermarks Good to know Length of access: Lifetime Redemption deadline: Redeem your code within 30 days of purchase Access options: Desktop and mobile Max number of devices: Up to 3 devices can be used per license. Available for both new and existing users that are not on lifetime plan. Updates included A lifetime subscription to EbookMagic Starter Plan normally costs $149, but this deal can be yours for just $39.99, that's a saving of $109. For full terms, specifications, and license info please click the link below. Get this EbookMagic Starter Plan lifetime deal for just $39.99 (was $149) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
  • Recent Achievements

    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Week One Done
      Timaximus earned a badge
      Week One Done
    • Rookie
      FBSPL went up a rank
      Rookie
    • First Post
      davidbazooked earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      492
    2. 2
      PsYcHoKiLLa
      169
    3. 3
      +Edouard
      164
    4. 4
      Steven P.
      85
    5. 5
      ATLien_0
      76
  • Tell a friend

    Love Neowin? Tell a friend!