• 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

    • Disabling open on hover, great! That was so stupid! They need to do a fix, where if a network share is disconnected, it doesn't hang when opening "This PC" for 20 seconds.
    • Microsoft releases major feature updates for stock Windows 11 apps by Taras Buria In addition to releasing new Windows 11 preview builds, Microsoft announced that inbox Windows apps now have dedicated release notes in the official documentation. At long last, users have access to all the release notes for each app, with changes listed in chronological order. Microsoft used to announce feature updates for stock apps with each build. Now, with Windows Insider release notes hosted on the Microsoft Learn website, each app has a dedicated space for its changelog, which is very useful for those who want to track new features and improvements. Alongside that, Microsoft dropped massive feature updates for six stock apps: Clock, Media Player, Calculator, Voice Recorder, Photos, and Paint. Each app packs quite a lot of changes and new capabilities, so here are the release notes. Here are quick notes so that you can jump to the app you are interested in the most: Calculator Camera Clock Media Player Paint Photos Sound Recorder Here is what is new for the Calculator in version 11.2605.9.0: More accurate square-root results — Fixed rare cases where a calculation that should equal zero (like sqrt(2.25) - 1.5) returned a tiny leftover value instead. Readable text in High Contrast themes — Settings text now shows the correct colors in the High Contrast Aquatic and Desert themes. Fixed layout for right-to-left languages — For languages like Arabic and Hebrew, the graph, number pad, equation fields, and scroll buttons now appear correctly oriented. Reliable launch after upgrading — Fixed an issue where upgrading from much older versions could leave outdated settings that stopped the app from opening. Here is what is new for the Camera app (version 2026.2605.7.0): Zoom slider works on more cameras — The zoom slider now works on the latest cameras, respects your system zoom settings, and updates instantly when you change those settings. Full range of zoom levels — Fixed an issue where the zoom slider only showed three steps on some devices that zoom in finer increments. Front camera works on more devices — Resolved a problem that blocked the front-facing camera on certain wide-angle devices. More video resolution choices — You can now pick video resolutions that were previously hidden; the app shows a heads-up warning instead of removing them. QR links you can still use — When a scanned QR code points to something with no matching app, the link is now copied to your clipboard (with a notification) while still offering a Store search. Smarter default settings — When you haven't set a preference, the app now follows your system settings by default. The Clock app has a massive changelog with the following improvements in version 11.2605.9.0: Timers keep counting after they hit zero — When a timer runs out, it now keeps counting up (for example, -00:27:31) so you can see how far past the time you've gone. You can turn off the daily goal — Focus Sessions now include an "Off" option so you can skip setting a daily goal entirely. New 15-minute snooze option — Alarms now offer a 15-minute snooze interval. Run up to 3 countdowns at once — The Countdown Widget now supports three simultaneous countdowns, up from two. Timer Widget notifications now appear — Fixed an issue where the "timer finished" notification didn't show when the timer was started from the widget. Less clutter in Focus Sessions — Tasks you've already completed no longer show up in the Focus Session task list. More accurate focus progress — Fixed a rounding issue that could show your daily focus progress as a minute short (for example, 49 minutes instead of 50). Smoother World Clock comparisons — The World Clock compare page now loads dates as you scroll, so it feels more responsive. Up-to-date World Clock locations — Refreshed country and city names to match their current names. Correct sun and moon icons during midnight sun — Fixed an icon that wrongly showed a moon during all-day daylight in polar regions. Fixed back-button behavior in clock comparisons — Pressing back once now takes you back as expected, instead of jumping the date to 1926. Corrected the Newfoundland time zone — Newfoundland now uses the right time zone (St. John's). Disabled alarms stay looking disabled — Editing a turned-off alarm no longer makes it appear turned on. Cleaner timer cards — The expand button is now turned off on timer cards that have no time set, preventing actions that wouldn't do anything. Clearer theme setting — Updated the wording to "Choose your preferred app theme." Smoother Settings links — The "About" links in Settings no longer trigger an unexpected "switch apps" prompt. Fixed spacing in Spotify settings — Corrected uneven spacing in the Spotify settings card. Better focus visibility in High Contrast — The focus highlight in World Clock is now clearly visible in the High Contrast Aquatic and Desert themes. No more double announcements — Screen readers no longer read the timer value twice. Countdown names read correctly — Screen readers now properly announce the name of each countdown. Keyboard focus stays put — Focus no longer disappears after you press the Timer Reset button. Clearer alarm toggle for screen readers — Tidied up how the alarm on/off switch is announced. The Media Player app received plenty of changes as well (version 11.2605.14.0): Custom captions — You can now personalize how closed captions appear, with caption styling tied to your Windows caption settings, plus a quick link to open those settings directly. "Indexing" banner in the play queue — When your media library is still being scanned, a banner now explains why some items may not appear yet. Fixed the look of selected items — Corrected a layout glitch with selected items in lists. Fewer playback failures — Improved how the app recognizes supported file types, so more files play without issues. Playlists need a name — You can no longer accidentally save a playlist with a blank name. Cleaner look for empty playlists — Improved how a playlist appears when it has no items yet. More stable play queue edits — Fixed a crash that could happen when changing the play queue while the app was switching between sessions. Clearer "missing codec" message — Improved the dialog that appears when a file needs a codec you don't have, with clearer guidance on what to do. A big update is also available for Paint in version 11.2605.61.0: Adjustable eraser transparency — You can now control how transparent the eraser is. Cleaner stamp brush strokes — Fixed visible color shifts and artifacts when using stamp-style brushes. JPEG photos save in place — Opening a rotated JPEG and pressing Save now overwrites the original instead of unexpectedly prompting "Save As." No more crash on bad image files — Opening a damaged or invalid image, from within the app, by double click, or commandline, now shows a clear error message instead of closing the app. Classic selection behavior restored — The selection outline now hides while you move, resize, or rotate a selection, just like in classic Paint. Tidier AI image panel — Fixed missing spacing at the bottom of the AI image generation panel for a cleaner layout. Visible button hover in light theme — Toolbar split buttons now show a clear hover highlight in the light theme. Snappier toolbar — Streamlined how the ribbon lays out, giving a small speed boost at startup. Fewer background crashes — Fixed a crash that could happen while background tasks were finishing up. Stable app shutdown — Prevented rare crashes when closing the app. Fixed layer removal glitch — Deleting the active layer no longer leaves the layers list in an inconsistent state. Here is what is new in the Photos app (version 2026.11060.2004.0): AI watermarking — AI-generated or edited images can now carry a visible Copilot watermark. You choose Never, Always, or Ask Every Time in Settings, with a confirmation when saving. The watermarking is off by default in settings. Better viewing of small images and pixel art — Tiny images (like 16×16 pixel art) now zoom in far more to fill the screen and stay crisp instead of looking blurry. Select scanned text with the keyboard — When text is detected in an image, you can now navigate and select it using the arrow keys, Shift+Arrow, Home/End, and Ctrl+A, with a clear focus highlight. Fixed a crash in text recognition — Resolved a crash that could close Photos while detecting text in images; the app now recovers gracefully. Easier keyboard navigation — Tabbing through the navigation bar no longer stops on hidden controls, so it takes a single Tab to move past it instead of three. And finally, here is the Sound Recorder (version 11.2605.1.0): Waveform shows with Bluetooth mics — The live waveform now displays correctly when you record using a Bluetooth audio device. No more stray scrollbar — A non-working horizontal scrollbar no longer appears at the bottom of the waveform unless you've zoomed in. Mark button ready right away — The Mark button no longer looks grayed out until you hover over it after opening the app. Markers hidden for WAV files — Markers are now turned off for WAV recordings, since that format can't store them — so they're no longer lost silently. Smoother deleting — Quickly pressing Delete and Enter to remove several recordings in a row no longer triggers a "file doesn't exist" error. Fixed a memory issue — Resolved a memory leak that occurred each time a recording started. You can find all these changelogs in the official documentation here.
    • again, an article about Microsoft Edge and ridicules hater's comments
    • From this very same article: "For organizations that prefer a “more deliberate pace”, the Extended Stable channel remains an option."
    • Or every other browser, because they all behave the same, at least the mainstream ones. Firefox does exactly the same: background updates, restart to install them. Haters gotta hate, I guess.
  • Recent Achievements

    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • 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
  • Popular Contributors

    1. 1
      +primortal
      514
    2. 2
      PsYcHoKiLLa
      170
    3. 3
      +Edouard
      162
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      78
  • Tell a friend

    Love Neowin? Tell a friend!