[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 »

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

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

Re: [RFC] HTML5 doctype

Post by callumacrae »

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

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

Re: [RFC] HTML5 doctype

Post by /a3 »

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
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] HTML5 doctype

Post by callumacrae »

/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

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

Re: [RFC] HTML5 doctype

Post by igorw »

/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
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] HTML5 doctype

Post by naderman »

Merged into develop.

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

Re: [RFC] HTML5 doctype

Post by Oleg »

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).

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

Re: [RFC] HTML5 doctype

Post by /a3 »

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 »

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 »

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