5

One of the new doctype declarations can be specified as:

<!doctype html>

But recently I came across one which was slightly different (view source on http://html5boilerplate.com/):

<!doctype html public "">

But I couldn't figure what is it for, public part?

Thanks.

Dmitry F
  • 1,650
  • 1
  • 15
  • 20

3 Answers3

7

You missed one important character

<!doctype html public "✰">

Inside the quotes is a star character. They like putting it everywhere. Its valid but not in any way useful :P

Andrew
  • 13,757
  • 13
  • 66
  • 84
  • The Easter Bunny Strikes Again – Félix Saparelli Oct 20 '11 at 02:34
  • @Moin yep. their dtd for the page is public and is a star. – Andrew Oct 20 '11 at 02:34
  • I think so too, it's like a signature or something. but wanted to check, maybe there are some use-cases where it can be useful. But I can't think of any. – Dmitry F Oct 20 '11 at 02:36
  • 1
    @DmitryF No use at all, the reason the html5 doctype is ` ` is because that is the minimum that validates in every browser in usage now. And no browser actually cares what is in it, they just check that it is there. – Andrew Oct 20 '11 at 02:40
1

this is mentioned in the html5boilerplate changelog, do a search for doctype on the page.

Its been done to disable dtd warnings in IDE's like eclipse.

See: Disable DTD warning for Ant scripts in Eclipse?

Community
  • 1
  • 1
Moin Zaman
  • 25,281
  • 6
  • 70
  • 74
0

IE10 needs the PUBLIC "" to properly treat the page as HTML 5 - at least on the Windows 7 version.

Ry-
  • 218,210
  • 55
  • 464
  • 476