It has nothing to do with pinterest. Your closing
is an XHTML form. HTML tags end in
Oh, and the 4.01 DTD is properly
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
You left out a bit.
|It has nothing to do with pinterest. |
Except that that's where the NoPin tag came from. They publish it in that form as the NoPin option
If I had to choose between validating and allowing pinning, I'd give up on validating. That's why I'd like to know if the tag will still work if I alter it.
I'll use the version Doctype that you posted.
Maybe they assume that everyone reading their instructions is using a wysiwyg editor that outputs xhtml. In xhtml, everything has to close. You'll also see forms like
<img blahblahblah />
But, again, that final / has nothing to do with the validity of the tag. In fact pinterest won't even see it; all they're looking for is the bit inside the quotation marks.
OK, thanks. I'm more than a bit cluesless on this stuff.
|Building a new website ... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
I'd suggest to use HTML5 or if you fancy a challenge: polyglot html5 for anything new.
html4.01 is history.
|<!DOCTYPE html> |
Still wondering what they'll do when HTML 6 comes along.
|Still wondering what they'll do when HTML 6 comes along. |
The brainiacs at whatwg assume browsers will be good enough by then to not need versions of html anymore and switch to an evolving standard without versions.
Personally I'm not a believer of a version-less thing as the past has proven that popular browsers can maintain their popularity among their users and still hold us all back for many years.
Also if you try to use it as a norm to agree on work of others and versify that they did as promised (browser maker, developer of application, ...anything that does "html") you end up pointing at a moving target: everybody involved will not only hate it, but it's also impossible to use.
Ah, the html equivalent of @supports, coming soon to a stylesheet near you. Or to MSIE 35, whichever is later.
Although, come to think of it, CSS doesn't come with a version declaration. And, conversely, my browser has no objection to <wbr> dropped into the middle of an HTML 4.01 document. The validator yes; the browser no.
|The brainiacs at whatwg assume browsers will be good enough by then to not need versions of html anymore and switch to an evolving standard without versions. |
Browsers have always worked this way since the beginning. The only thing that has changed is W3C specs (and WHATWG specs) now recognise this.
|Still wondering what they'll do when HTML 6 comes along. |
They'll do exactly the same thing they did on the transition from HTML0 to HTML2, HTML2 to HTML3.2, HTML3.2 to HTML4.01, HTML4.01 to XHTML1 (as text/html), HTML4.01/XHTML1 to HTML5, and HTML5 to HTML5.1 (i.e. continue working as before).
Would you expect all current browsers to reject HTML6 pages? ;)
Uh, you missed my point. The dtd for HTML <5 says "HTML version such-and-such". The dtd for HTML 5 says "HTML". What will the dtd for HTML >5 say?
Sorry, it's not clear what you mean - why do we need version indicators? The point of a continuous development model ("Living Standard") is that version indicators are not needed.
The only reason there is a doctype declaration at all is to trigger quirks/almost standards/standards layout mode in browsers.
CSS and JS work just fine without version indicators. HTML did previously use version indicators, but for purely theological reasons. :)
So the OP can just use <doctype html> and not have to worry about all this stuff.
Typo: the correct spelling is <!doctype html>
is a contradio in terminis.
You need to be able to reference to a standard (even in plain writing), having it as a moving target is a bad idea.
A real standard (one that's not a moving target) is e.g. needed in contracts between a web developer and a site owner. You can't validate the work if the standard you agreed upon shifted (maybe or maybe not) during the work.
Standards are designed to create order in the chaos. What watwg is doing is create chaos cause the browser makers like it that way aparently.
That's another of those "bright" ideas: they dot rid of that pesky dtd as it was enabling us to say "invalid" all too easy.
I'm no fan of the dumbing down, but whatwg is runninng the show for now and (x)html5 it is. So I'm sticking to try to make due with polyglot (x)html5. It's a pity though 3rd parties such as Google make their stuff like e.g. adsense so archaic that it still uses document.write after all these years (document.write is illegal in xml delivered html).
The tag soup promotion in the html5 specs and the attitude of everything is optional is just pain wrong. Sure the browser could accept things to be less than perfect and try to make it work anyway, but at least tell those crafting software that generates html or those that write html by hand how it should be (and there it *must* be as perfect as possible to allow the browsers as little room as possible to have to resort to guessing what was meant.
Anyway, html5 it is for now - till we can get some more enlightened people back at the helm and make html6 :)
|A real standard (one that's not a moving target) is e.g. needed in contracts between a web developer and a site owner. You can't validate the work if the standard you agreed upon shifted (maybe or maybe not) during the work. |
You're assuming "standard" = "implemented interoperably in browsers". This has never been the case, and part of our job is explaining this to clients.
|That's another of those "bright" ideas: they dot rid of that pesky dtd as it was enabling us to say "invalid" all too easy. |
A DTD isn't required for validation, and in fact DTD's aren't sufficiently rich enough to express the complexity of HTML/XHTML anyway. This is why the XML world also largely abandoned DTD's years ago, in favour of RELAX NG, Schematron etc.
|The tag soup promotion in the html5 specs and the attitude of everything is optional is just pain wrong. |
Late 90s cargo-cult XHTML-fandom seems to be the problem here :) The spec defines HTML and XHTML serialisations, so there's nothing to stop you using XHTML, but most people prefer to spend their time on stuff that actually matters.
W3c HTML5/HTML5.1 makes XHTML1 appendix-C style void elements conforming in HTML, so authors don't need to worry about whether to use:
<meta name="pinterest" content="nopin" />
<meta name="pinterest" content="nopin">
both are fine when using <!doctype html> and this makes things a lot simpler for everyone. Think of it as graceful error-recovery for the XHTML years. ;)
The SOLE purpose of a doctype for HTML is for Internet Explorer. Always has been. NO other browser ever required it and browsers changed their behavior to be compatible with IE's multitude of quirks and irresponsibilities.
XML did NOT abandon the DTD and true XML can still use custom DTDs.
The so-called "HTML5 doctype", as someone else said, notice there is no "5" in there. While it's allowed to use lowercase 'doctype' in this new version, uppercase was always required in the past and still works and validates with the new version.
Just rattling things off that I noticed and remembered.
|The SOLE purpose of a doctype for HTML is for Internet Explorer. |
This "layout mode switching by doctype" was first proposed for NGLayout in Netscape 5 ~1998, but first implemented in IE5/Mac ~2000. It's now used by all browsers to switch layout mode as I pointed out above.
|XML did NOT abandon the DTD and true XML can still use custom DTDs. |
Obviously DTDs can still be used, it's just that e.g. RELAX NG can express more, which is why DTD's have been largely abandoned for other approaches to validation.
|The so-called "HTML5 doctype", as someone else said, notice there is no "5" in there. While it's allowed to use lowercase 'doctype' in this new version, uppercase was always required in the past and still works and validates with the new version. |
The HTML doctype declaration is not case sensitive, so either way is fine.
|You're assuming "standard" = "implemented interoperably in browsers". |
Nope. A standard is a definition. That the browser crafters deliver subpar products is well-known.
It doesn't mean the standard should be subpar as well.
Letting the browser crafters control the standard is the core of the problem.
|This has never been the case, |
"never": tricky thing to use as one examples undermines your entire statement ... Guess you were not around before netscape came along. Browsers did support all that was in the standard back then - standard was also much shorter and easier to implement for sure.
Back then the introductions to html also started with a double statement:
- that authors of html code *had* to make perfect compliant code and not assume a browser would fix their errors for them
- that browsers *had* to allow for errors in the coding by the authors and do their best to render it as good as possible in the face of errors or omissions.
|A DTD isn't required for validation, |
A document can be validated against a DTD without using somebody else's service ... pointing to validation services does not make it nonsense that a DTD is easy to validate a document against.
|Late 90s cargo-cult XHTML-fandom seems to be the problem here The spec defines HTML and XHTML serialisations, so there's nothing to stop you using XHTML, but most people prefer to spend their time on stuff that actually matters. |
Enjoy your tag soup!
Just wondering, given the agressive tone in your reactions, do you work for whatwg ? Or somehow feel a need to defend them ?
Yes, and the SOLE purpose of a doctype was cause Internet Explorer screwed everything up with quirks. If it weren't for that, you would not need a doctype at all.
|This "layout mode switching by doctype" was first proposed for NGLayout in Netscape 5 ~1998, but first implemented in IE5/Mac ~2000. It's now used by all browsers to switch layout mode as I pointed out above. |
Yes, that's what I said. The NEW doctype is not case sensitive but anything before this one IS case sensitive.
|The HTML doctype declaration is not case sensitive, so either way is fine. |
swa66: Sorry I don't mean to be aggressive, but I do think it's silly for folks to still be posting duff advice about XHTML and DTD's from over a decade ago. The W3C XHTML2 Working Group was disbanded 4 years ago. Tim Bray suggested XML should drop the doctype 8 years ago. "HTML5" will be ten years old next year. The XML and HTML worlds have long since moved on.
HTML is gradually cleaning up all this pointless legacy SGML/XHTML complexity, and authors can already avoid this legacy stuff altogether by just using <!doctype html> in their web pages. That's what I would heartily recommend to everyone :)
|"HTML5" will be ten years old next year. |
... and is still officially a Candidate Recommendation, with some elements at risk of being dropped "due to lack of implementation" which apparently means "We've been selling it for ten years but nobody's buying".
You think you've got problems? I can't use columns in e-books ... not because msie <10 doesn't recognize the format, but purely because it's CSS3. Grr.
I don't think anybody is advising anybody to use XHTML2.
Html5 includes XHTML5 as an integral part. There's no reason not to use what's available.
And if you use polyglot (x)html5 it also just works.
It's also clear that there are many out there who do not see the advantages of well-structured valid code, of having a readily available and complete toolset to parse, change, transform, automate and manipulate xml data that can be used on your webpage source just as well, ...
But not understanding or seeing the advantage for yourself gives you no right to dismiss it on somebody else's behalf. I'm sorry, but it's just not right to do that.
swa66: I agree, and support XHTML continuing to be developed with HTML as an alternative serialisation. I just don't agree that telling people to use XHTML or Polyglot (Appendix C) is good advice. For 99.9% of sites there's no benefit, so most people should just use HTML and get on with their lives.
lucy24: I've created a new thread about HTML5.1 here: