Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case of <!DOCTYPE html> #335

Closed
alanhogan opened this issue Feb 23, 2011 · 12 comments
Closed

Case of <!DOCTYPE html> #335

alanhogan opened this issue Feb 23, 2011 · 12 comments

Comments

@alanhogan
Copy link

This is such a tiny nitpick of a comment to make, so I’m sorry.

But the boilerplate starts with <!doctype html>. I understand <!DOCTYPE html> is much more common, for example, on this MSDN page (I know, I know) and on sites like diveintohtml5.com.

I’m sure all browsers anyone uses checks the doctype in a case-insensitive manner, and yet, I wonder what reason there could be to buck the trend?

I wouldn’t even mention it, but for

  1. The case change may throw off a couple lame developers such as myself, and
  2. When it’s lowercased my text editor highlights the word doctype in red, the color reserved for syntax errors. Feels bad, man.

Thoughts?

@paulirish
Copy link
Member

I think a nice side effect of lowercase is to make developers curious.

And then they dive in, realize it's totally peachy.. and learn a bit more about how browsers work.

It's a feature!

@alanhogan
Copy link
Author

Works for me, as long as there’s an intention behind it :)

@jonathantneal
Copy link
Member

On the web, all the other elements get to be written in lowercase. !doctype gets to play too now! :)

@alanhogan
Copy link
Author

@jonathan Your link appears to be link to a google SERP for “All of the other reindeer” but clicking it merely refreshes this page… most bizarre

@mathiasbynens
Copy link
Member

The only real argument here is #2. Even TextMate.app highlights <!doctype html> in red, but is fine with <!DOCTYPE html>. That’s a bug in TextMate though — it’s up to them to fix it.

P.S. @jonathantneal Don’t wrap URLs in quotes when linking in Markdown, it will create a title attribute instead of href.

@alanhogan
Copy link
Author

Ah, that explains the mystery hyperlink. Oddly enough, the link worked fine in the email notification I received for that comment.

@chuanxshi
Copy link
Member

@mathiasbynens: agreed, it's text editor's responsibility.

@ghost
Copy link

ghost commented Aug 2, 2011

This issue looks less theoretic to me since I just had to realize that my newly installed Firefox 5.0.1 throws a nasty

XML Parsing Error: syntax error
<!doctype html>

when you feed him a file with doctype keyword in lowercase.
Is anybody else experiencing this problem ?

@mathiasbynens
Copy link
Member

@christianlerch: The DOCTYPE (if used at all) is only required to be uppercase in XHTML. Don’t use XHTML. See http://mathiasbynens.be/notes/xhtml5

@ghost
Copy link

ghost commented Aug 3, 2011

Wouldn't it be wise to observe polyglot markup constraints with html5boilerplate?
Reason: server-side eco-systems heavily rely on XML.
I cite from the respective W3C Working Draft:
"It is often valuable to be able to serve HTML5 documents that
are also well formed XML documents. An author may, for example,
use XML tools to generate a document, and they and others may
process the document using XML tools. "
And, strange but true, for polyglot markup DOCTYPE must be uppercase.
Good point?

@alanhogan
Copy link
Author

Hard to disagree here, christianlerch.

@ghost
Copy link

ghost commented Aug 4, 2011

Sure, but does this mean that there could be a polyglot edition of
html5boilerplate in the near future ?
Chris

Am 03.08.2011 07:32, schrieb alanhogan:

Hard to disagree here, christianlerch.

On Aug 2, 2011, at 9:40 PM, christianlerch wrote:

Wouldn't it be wise to observe polyglot markup constraints with html5boilerplate?
Reason: server-side eco-systems heavily rely on XML.
I cite from the respective W3C Working Draft:
"It is often valuable to be able to serve HTML5 documents that
are also well formed XML documents. An author may, for example,
use XML tools to generate a document, and they and others may
process the document using XML tools. "
And, strange but true, for polyglot markup DOCTYPE must be uppercase.
Good point?

Reply to this email directly or view it on GitHub:
https://github.com/paulirish/html5-boilerplate/issues/335#issuecomment-1715473

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants