These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:06 pm Advanced search

Forward Compatibility: HTML5 Versionless Doctype

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Forward Compatibility: HTML5 Versionless Doctype

Postby JAB Creations » Wed Dec 03, 2008 9:05 pm

One of my greatest concerns for HTML5 is it's versionless Doctype. While CSS doesn't require any declarations and you can choose to validate a CSS file as CSS 1, 2.0, 2.1, or 3 there are some issues even in that given setup. For example collapsed margins are utterly useless and completely anti-intuitive however there is no way to prevent them in many circumstances. I never opted in though I can't opt out! Even if the feature was dropped as it should be I'd still have to deal with it for years (or in IE's case two decades perhaps). I highly doubt HTML5 will live on for eternity and I'm sure that some people will prefer the behaviors associated with certain versions of (X)HTML over new and "improved" versions. I personally keep copies of installers because countless times a new version of software removed useful features (Vista and Windows Explorer degrade from XP and IE7's non-customizable GUI are perfect examples of feature degradation).

Without a version declaration in the Doctype the web overall becomes constrained. Many sites will never be updated using HTML4 Doctypes in example. As browsers are updated (some much slower than others) how would an HTML7 browser treat HTML4? Will in example an HTML7 capable browser (when the time comes of course) treat an HTML4 document as an HTML4 document is currently treated? What of course will happen with HTML5 documents? IF HTML8 turns out to not be backwards compatible what will happen with HTML5 written pages if they all use the same Doctype? What will happen with quirks mode in the coming years...decades even? A versionless Doctype in forces the entire industry to wait for a complete recycle of the browsers at that time and simply does not consider the fate of older pages that while rarely if ever updated still provide relevant information. In essence a versionless Doctype is no less than the declaration of, 'I am the last version of HTML you'll ever need to use!'

While I know XHTML2 is taking a dramatically different and not backwards compatible approach it's Doctype does declare the version. Properly programmed browsers will most likely have to treat XHTML 1.1 and 2.0 pages differently so as someone voicing their concerns for the longevity of HTML I ask why has HTML5 rejected declaring the version and what benefits and reasoning have negated the clear need for declaring the version HTML a page is using?
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby lyosha » Thu Dec 04, 2008 2:56 am

1. Any other doctype would have to be long like HTML 4's and we don't want a long doctype that's hard to remember. ( things like <!DOCTYPE HTML 5> trigger quirks mode, so they are not an option)

2. HTML 5 doesn't even have a dtd, so if we did want a long doctype, it'd still be impossible.

3. If we had a dtd for HTML 5 it'd be completely useless to browsers.

4. Browsers parse all HTML the same, they just render pages with certain doctypes and unknown doctypes (eg. HTML 5's) in standards mode. browsers do NOT actually read the DTD and don't give a care about versions. They treat XHTML differently (only application/xhtml+xml or application/xml) because it's XML.

5. The only (practical) reason for a doctype is to switch the browser to standards mode. There is absolutely no other useful purpose. in fact, we'd rather not have it at all, but we have no choice unless we want quirks mode.
lyosha
<h3>
 
Posts: 60
Joined: Fri Aug 22, 2008 9:26 pm

Postby JAB Creations » Thu Dec 04, 2008 3:14 am

I'm going to ignore speaking as "we" to falsely suggest authority. If you don't agree then voice your opinion as so though don't try pushing using false arguments.

Moving along...

1.) It's not difficult to do a Google query to find an example of a Doctype.

2.) Why would having a Doctype be impossibly?

3.) Why are dtd's completely useless for browsers?

4.) You're ignoring my concerns about forward compatibility.

5.) Then why do dtd's exist in the first place?
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby campax » Thu Dec 04, 2008 2:17 pm

1) it is not difficult to do a Google query and find the latest HTML specification

2 + 3) it wouldn't be impossibile, but it would be useful if and only if you provided different parsers for each HTML version
but you don't only need a specific parser, you need:
- specific dom bindings
- specific css implementation (for elements that can be focusable or selectable)

moreover, the HTML 5 defines things that don't only concern html, things like browsing context, plugin interaction, communication, user interface
you would need to implement all this for each HTML version

actually, i think that is easier to use the previous version of your favorite browser
(if a page worked with IE6 but not with IE8/FF3/WK3/O9.6 do you complain with all browser vendor or with the page author?)

4) forward compatibility is not a concern
it is web developer's problem to get a web site working on the latest browser (or people slowly will abandon it)

5) it exits because HTML1/2/3/4 where based on SGML, that is like XML: a way to markup everything
browser could not implement everything though, so SGML was cut in different markup languages, of which only HTML survived
the dtd was then introduced to allow a SGML parser to check that only specific tags and attributes were used

(if you ever used XML then you probably know the difference between well-formed, valid, and semantically correct)
campax
<h6>
 
Posts: 8
Joined: Mon Nov 24, 2008 3:42 pm

Postby anne » Thu Dec 04, 2008 6:14 pm

If we can't be backwards compatible in a future version, we can introduce versioning then. Until then, it's not needed. (Note that CSS and the DOM don't have versioning either and are doing just fine.)
User avatar
anne
<h4>
 
Posts: 32
Joined: Tue Feb 06, 2007 11:17 pm
Location: Utrecht, NL

Postby lyosha » Wed Dec 10, 2008 2:37 am

JAB Creations wrote:I'm going to ignore speaking as "we" to falsely suggest authority. If you don't agree then voice your opinion as so though don't try pushing using false arguments.


I didn't say that to imply authority, but rather to show the opinions of the WHATWG and many in the web developer community who support the WHATWG and HTML 5, since they line up to what I said AFAIK, but I will refrain from saying 'we' from now on. Feel free to correct me if I'm wrong on any of the points.

JAB Creations wrote:1.) It's not difficult to do a Google query to find an example of a Doctype.


That's a funny argument if you ask me. google how to start a blank C++ file every time you need to program. Using the dtd in the first place as a mode switch (the only thing it was used for in browsers) was a mistake, IMHO.

JAB Creations wrote:2.) Why would having a Doctype be impossibly?


It isn't, but it's impossible to have a real doctype declaration without a doctype definition. It's like saying you live at an address that doesn't exist. It's just that there is no official HTML 5 dtd in existance, therefore, anything you put in the URL for the dtd declaration would lead to nowhere (unless you made your own dtd based on HTML 5, which would still be useless in a browser). Not to mention the HTML 5 spec covers more than can be defined in a dtd.

JAB Creations wrote:3.) Why are dtd's completely useless for browsers?


Because the browsers don't read them, they just have a list of which dtd declarations should trigger standards mode and which trigger quirks mode. They don't even read the actual dtd, otherwise browsing would be quite slow. dtd's can be useful to some programs, but those programs aren't browsers. I could actually use an HTML 5 dtd just so I could import it into Quanta+ without making the dtep myself and updating it every time something changes manually. It's just a little laziness though.

JAB Creations wrote:4.) You're ignoring my concerns about forward compatibility.


None of the HTML versions so far have been forward compatible in that sense since the browsers parse all html the same. So, nobody's changing anything as far as forward compatibility goes.

JAB Creations wrote:5.) Then why do dtd's exist in the first place?


Was already answered in the thread.
lyosha
<h3>
 
Posts: 60
Joined: Fri Aug 22, 2008 9:26 pm


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest