• 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

    • All it does is use the CPU more efficiently during boot to speed up boot times. That's it. Yawn....
    • It's not a one or the other kind of thing. Software should run efficiently, and the operating system should appropriately manage the CPU clocks. You could have the best most optimized software on earth, and it will still run faster if the CPU does a better job of boosting as needed. All this is doing is pre-boosting the CPU based on user actions, instead of waiting for the normal detection mechanism to kick in. If the OS knows it is about to need more CPU, why shouldn't it use that knowledge? It's the same idea of downshifting before passing someone, instead of just burying your foot into the peddle and waiting for the transmission to figure out what you want to do.
    • Audacity 3.7.8 by Razvan Serea Audacity is a free, open source digital audio editor and recording application. Edit your sounds using cut, copy, and paste features (with unlimited undo functionality), mix tracks, or apply effects to your recordings. The program also has a built-in amplitude-envelope editor, a customizable spectrogram mode, and a frequency-analysis window for audio-analysis applications. Built-in effects include bass boost, wah wah, and noise removal, and the program also supports VST plug-in effects. You can use Audacity to: Record live audio. Record computer playback on any Windows Vista or later machine. Convert tapes and records into digital recordings or CDs. Edit WAV, AIFF, FLAC, MP2, MP3 or Ogg Vorbis sound files. AC3, M4A/M4R (AAC), WMA and other formats supported using optional libraries. Cut, copy, splice or mix sounds together. Numerous effects including change the speed or pitch of a recording. Write your own plug-in effects with Nyquist. And more! See the complete list of features. Audacity 3.7.8 changelog: #10688 Fixed an exception thrown when pasting into a newly-created track (Thanks, David Bailes (@DavidBailes)!) #10870, #10884, #10775, #10629 Fixed tone generation, waveform-scale setting, SetClip Name parameter, and clip-boundary command names for scripting and macros (Thank you, David Bailes (@DavidBailes)!) #11106 Fixed the loading of presets for the Distortion effect (A million thanks, David Bailes (@DavidBailes)!) #10947 Fixed paste into an empty audio track not preserving the source sample rate (Thanks, Juan Gabriel Colonna (@juancolonna)!) #10776 Allowed AltGr modifier in label and clip name editing (Thanks, Davide Peressoni (@DPDmancul)!) #9938 Added options to choose where silence is truncated (start/middle/end) (Thanks, Noah Rosenfield (@nosenfield)!) #9935 Added Podcast 2.0 chapters JSON export for label tracks (Thanks, Noah Rosenfield (@nosenfield)!) #10103 Improve UI on HiDPI displays on Linux/wxGTK (Thanks, Ivan A. Melnikov (@iv-m)!) #10099 Fixed MixerBoard Mute and Solo button display (Thanks, Ivan A. Melnikov (@iv-m)!) #10681 Fixed multichannel FLAC import #10999 Fixed envelope being broken after joining clips Download: Audacity 64-bit | Standalone ~20.0 MB (Open Source) Download: Audacity 32-bit | Standalone Download: Audacity ARM64 | Standalone View: Audacity Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • There really isn't anything magical about the low latency profile, other OS's do this as well. All they're doing is using your CPUs boost clock options in a more smarter way.
    • So we shouldn't have the option because of people using their laptops on battery? OK? LOL
  • Recent Achievements

    • One Month Later
      Star Processing earned a badge
      One Month Later
    • Week One Done
      Star Processing earned a badge
      Week One Done
    • One Year In
      Star Processing earned a badge
      One Year In
    • Week One Done
      FBSPL earned a badge
      Week One Done
    • One Year In
      Jim Dugan earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      494
    2. 2
      PsYcHoKiLLa
      198
    3. 3
      +Edouard
      155
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      69
  • Tell a friend

    Love Neowin? Tell a friend!