FF botched the title, but my vote is for the XHTML correct option #3. Anything else is just begging for conversion to that option.
- Bill Strathearn
Hmm, I wonder if it was FF or Tumblr that didn't encode something right.
- DeWitt Clinton
What I was thinking though, was how HTML started out not intending for all tags to be self-closing, and definitely not explicitly enclose a block like that. The first HTML spec is interesting: http://www.w3.org/History.... It states "(In SGML terms, paragraph elements are transmitted in minimised form)." User agents didn't even know what to do with the closing </p> for a while.
- DeWitt Clinton
Hmm. In the RSS feed (http://micro.unto.net/rss), the title appears as: "<title>Quick poll: <p>, <p/>, or <p></p></title>" This renders as expected when loaded directly into FireFox 3.1. It does not render correctly in Google Reader, though. The RSS spec is ambiguous on this: http://cyber.law.harvard.edu/rss....
- DeWitt Clinton
My guess is that xml-encoding the '&' characters would make it work. I.e.: <title>Quick poll: &lt;p&gt;, &lt;p/&gt;, or &lt;p&gt;&lt;/p&gt;</title>
- DeWitt Clinton
In the Tumblr API (http://www.tumblr.com/docs/api), which is what I suspect FF is using instead of the RSS feed, it appears as "<regular-title>Quick poll: <p>, <p/>, or <p></p></regular-title>". See http://micro.unto.net/api/read. Again, no guidance given as to the encoding of 'regular-title'.
- DeWitt Clinton
The Atom Syndication format defines the content type and encoding of the 'title' element explicitly, which is the correct way to do this, because the client can't really guess if it isn't specified: http://www.atomenabled.org/develop....
- DeWitt Clinton
DeWitt, <p/> is incorrect usage if you actually intend the text "A quart jar" to be a paragraph. You can do the test yourself by creating an XHTML Strict document and then using your text and <p/>'s inside the body; the W3C validator will throw an error saying that "A quart jar" is not allowed in that position (because it is not enclosed in a paragraph -- your <p/> doesn't enclose anything, so "A quart jar" is a non-valid child of the body element). Your first <p> example is similarly not enclosing the firs
- Philipp Lenssen
@Philipp - right. For XHTML Strict. But what I'm wondering is what we'll see in '<!doctype html>', where it is neither XML nor strict. I'll write something to see how often those are used relative to each other on the web today.
- DeWitt Clinton
I used p as separator for a while and then in the late 90s sometime I switched to p as container. I've not seen the p/ as separator style; that makes no sense to me.
- Amit Patel
@Amit - True. I'd be very surprised to see <p/> used in practice, and I agree that it is wrong. But hey, it's the web, so you never know.
- DeWitt Clinton
DeWitt, in your first example, the first text -- "The quick brown fox..." -- is also no paragraph. Only "The five boxing" and "Amazingly few" of that example are. You're using <p></p> like a <br />, but a break does not wrap content as a paragraph is intended to do. This would have different negative consequences, e.g. when applying the p:first-child pseudo class in CSS, as it would then be applied in a non-intended place.
- Philipp Lenssen
@Philipp - very good point about the DOM tree that would be built from each. I'll compare the tree for each based on the HTML5 parser. Great idea.
- DeWitt Clinton