Re: [whatwg] DOCTYPE declaration

2011-10-16 Thread Glenn Maynard
On Sun, Oct 16, 2011 at 6:06 PM, Ashley Sheridan
wrote:

> Surely the  tag would do that? :p
>

It's optional.
http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#optional-tags

-- 
Glenn Maynard


Re: [whatwg] DOCTYPE declaration

2011-10-16 Thread Ashley Sheridan
On Sun, 2011-10-16 at 23:10 +0200, Nils Dagsson Moskopp wrote:

> Boris Zbarsky  schrieb am Sun, 16 Oct 2011 15:43:26
> -0400:
> 
> > On 10/16/11 2:15 PM, Francis Boumphrey wrote:
> > > My point is, as the only possible use for a DOCTYPE declaration in
> > > HTML (any version) is for includingdeclarations
> > 
> > And triggering browsers' standards mode, most importantly.
> > 
> > > why bother with an DOCTYPE declaration at all.
> > 
> > To trigger standards mode.
> 
> It is also a nice „magic string“ to figure out if a file is a HTML file.
> 
> 
> Cheers,


Surely the  tag would do that? :p

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] DOCTYPE declaration

2011-10-16 Thread Nils Dagsson Moskopp
Boris Zbarsky  schrieb am Sun, 16 Oct 2011 15:43:26
-0400:

> On 10/16/11 2:15 PM, Francis Boumphrey wrote:
> > My point is, as the only possible use for a DOCTYPE declaration in
> > HTML (any version) is for includingdeclarations
> 
> And triggering browsers' standards mode, most importantly.
> 
> > why bother with an DOCTYPE declaration at all.
> 
> To trigger standards mode.

It is also a nice „magic string“ to figure out if a file is a HTML file.


Cheers,
-- 
Nils Dagsson Moskopp // erlehmann



Re: [whatwg] DOCTYPE declaration

2011-10-16 Thread Boris Zbarsky

On 10/16/11 2:15 PM, Francis Boumphrey wrote:

My point is, as the only possible use for a DOCTYPE declaration in HTML (any
version) is for includingdeclarations


And triggering browsers' standards mode, most importantly.


why bother with an DOCTYPE declaration at all.


To trigger standards mode.


(Perhaps it's here just as some 'sacred cow' talisman and to prevent some
'hurt feelings' :>)


It's there to trigger standards mode in browsers.

-Boris



Re: [whatwg] DOCTYPE declaration

2011-10-16 Thread Francis Boumphrey
Thanks Tab,
I guess I could have stated myself a little clearer.
The spec says:

"DOCTYPEs are required for legacy reasons. When omitted, browsers tend to
use a different rendering mode that is incompatible with some
specifications. Including the DOCTYPE in a document ensures that the browser
makes a best-effort attempt at following the relevant specifications."

My point is, as the only possible use for a DOCTYPE declaration in HTML (any
version) is for including declarations, and no browser to my
knowledge does, not even the niche browsers, why bother with an DOCTYPE
declaration at all. As you point out

Doctypes in HTML have never, in practice, actually done anything
useful. 

Surely the Living HTML Spec could be cutting out some dead-wood here.
(Perhaps it's here just as some 'sacred cow' talisman and to prevent some
'hurt feelings' :>)

Frank


On Sun, Oct 16, 2011 at 1:34 PM, Tab Atkins Jr. wrote:

> On Sun, Oct 16, 2011 at 10:30 AM, Francis Boumphrey
>  wrote:
> > I'm not sure if this is the right place to ask this.
> > What, if any DOCTYPE declaration should be used on HTML5 documents. As
> these
> > usually refer to a DTD, and living HTML does not have a DTD is it even
> > appropriate to use one?
>
> You use the "" doctype, as explained in the spec.
>
> Doctypes in HTML have never, in practice, actually done anything
> useful.  The DTD reference hasn't been followed by any major browser
> (the W3C website has had to go to great lengths to protect itself from
> being DDOSed by the few editors and niche browsers that *do* follow
> DTD references), and essentially acts solely as a talisman that
> switches between Quirks Mode and Standards Mode.  "" is
> the minimal string that still triggers Standards Mode in every major
> browser.
>
> ~TJ
>


Re: [whatwg] DOCTYPE declaration

2011-10-16 Thread Tab Atkins Jr.
On Sun, Oct 16, 2011 at 10:30 AM, Francis Boumphrey
 wrote:
> I'm not sure if this is the right place to ask this.
> What, if any DOCTYPE declaration should be used on HTML5 documents. As these
> usually refer to a DTD, and living HTML does not have a DTD is it even
> appropriate to use one?

You use the "" doctype, as explained in the spec.

Doctypes in HTML have never, in practice, actually done anything
useful.  The DTD reference hasn't been followed by any major browser
(the W3C website has had to go to great lengths to protect itself from
being DDOSed by the few editors and niche browsers that *do* follow
DTD references), and essentially acts solely as a talisman that
switches between Quirks Mode and Standards Mode.  "" is
the minimal string that still triggers Standards Mode in every major
browser.

~TJ


[whatwg] DOCTYPE declaration

2011-10-16 Thread Francis Boumphrey
I'm not sure if this is the right place to ask this.
What, if any DOCTYPE declaration should be used on HTML5 documents. As these
usually refer to a DTD, and living HTML does not have a DTD is it even
appropriate to use one?
Frank