[RFC|Merged] HTML5 doctype

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] HTML5 doctype

Post by Oleg » Sun Jul 17, 2011 4:24 am

I have not tested it but I believe all of my objections have been addressed.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] HTML5 doctype

Post by callumacrae » Sun Jul 17, 2011 2:48 pm

HTML (all of them) implicitly declares the contents of script tags as CDATA, so the CDATA tags are no longer required:

Code: Select all

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>test</title>
</head>
<body>
  <script>console.log('</b>');</script>
</body>
</html>
valid

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <title>test</title>
</head>
<body>
  <script>console.log('</b>');</script>
</body>
</html>
invalid (the type attribute is no longer required on the script tag, too)


I approve of the change of doctype :-)

~Callum
Last edited by callumacrae on Wed Jul 27, 2011 9:45 am, edited 1 time in total.
Made by developers, for developers!
My blog

User avatar
/a3
Registered User
Posts: 97
Joined: Mon Sep 20, 2010 6:44 am

Re: [RFC] HTML5 doctype

Post by /a3 » Sun Jul 17, 2011 8:33 pm

callumacrae wrote:the type attribute is no longer required on the script tag, too
How ridiculous - that's a very poor decision on behalf of the WHATWG. What's was great about HTML was that there weren't many limitations on how it could be used - nobody was forced to use CSS or JavaScript. Theoretically, any styling or scripting language could be used. Now we're seeing "default" languages for HTML5. In future versions, will they deprecate alternative MIME-types for "maximum compatibility"?

On a side note, it's a pity that the <object> tag never took off either.

[/end rant]

Of course, I still approve the HTML5 doctype. I just don't approve all of the decisions made in creating HTML5.
$ git commit -m "YOLO"

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] HTML5 doctype

Post by callumacrae » Sun Jul 17, 2011 11:03 pm

/a3 wrote:
callumacrae wrote:the type attribute is no longer required on the script tag, too
How ridiculous - that's a very poor decision on behalf of the WHATWG. What's was great about HTML was that there weren't many limitations on how it could be used - nobody was forced to use CSS or JavaScript. Theoretically, any styling or scripting language could be used. Now we're seeing "default" languages for HTML5. In future versions, will they deprecate alternative MIME-types for "maximum compatibility"?

On a side note, it's a pity that the <object> tag never took off either.

[/end rant]

Of course, I still approve the HTML5 doctype. I just don't approve all of the decisions made in creating HTML5.
HTML5 = HTML + JS + CSS3 (or used to be), so I would say that it is perfectly reasonable for <script> to default to JavaScript ;-)

Obviously the type attribute can still be specified for inferior languages such as VBScript(?!)

~Callum
Made by developers, for developers!
My blog

User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] HTML5 doctype

Post by igorw » Mon Jul 18, 2011 8:23 am

/a3: Defaults make sense. CSS and JavaScript make sense as defaults for style and script. And no, I don't see the need to adjust all the existing stuff to use these defaults. New code, however, can do so.

In other news, I've set the ticket to fixed, so unless any concerns are raised, it will be merged soonish.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] HTML5 doctype

Post by naderman » Wed Jul 20, 2011 1:26 pm

Merged into develop.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] HTML5 doctype

Post by Oleg » Wed Jul 27, 2011 5:20 am

I just encountered a situation in which the declaration of encoding in the document was needed.

I saved a web page in Russian (utf-8 encoded) to disk, and opened the saved copy in firefox. Firefox showed the page in iso-8859-1 encoding. I had to manually switch encoding to utf-8 to read the page.

Considering that the encoding declaration was not hurting anyone I think it should be put back (and not the html5 encoding tag, the old meta content-type that all browsers understand).

User avatar
/a3
Registered User
Posts: 97
Joined: Mon Sep 20, 2010 6:44 am

Re: [RFC] HTML5 doctype

Post by /a3 » Wed Jul 27, 2011 7:33 am

I saved a web page in Russian (utf-8 encoded) to disk, and opened the saved copy in firefox. Firefox showed the page in iso-8859-1 encoding. I had to manually switch encoding to utf-8 to read the page.
http://www.w3.org/TR/html5-diff/#character-encoding

I think because it was saved to disk, Firefox wouldn't interpret any headers because there aren't any being sent (because it's a file, not over HTTP). So in cases like this, it would seem appropiate to specify the character set in the document.
$ git commit -m "YOLO"

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] HTML5 doctype

Post by Oleg » Thu Jul 28, 2011 12:12 am

Yes, the page obviously rendered fine over http (which is where the encoding was specified).

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] HTML5 doctype

Post by bantu » Thu Jul 28, 2011 10:27 pm

Oleg wrote:Considering that the encoding declaration was not hurting anyone I think it should be put back (and not the html5 encoding tag, the old meta content-type that all browsers understand).
I agree. It should certainly be possible to save a page to disk.

Post Reply