Markus Ernst wrote: > Would it cause serious issues to add the Phrasing Content category to > these three elements [ol, ul, dl] thus allowing them inside the p element? I'm afraid it would, and I think that's the reason why the content model hasn't been extended in HTML5. Consider <p>some text<ul>...</ul> <div>...</div> HTML specs up to and including HTML 4.01 and ISO HTML accept this, and definitely so that the <ul> tag implies a preceding </p>. This means, for example, that if you have set a background color for the p element in a stylesheet, it only applies to the block containing "some text", not the ul element. If p elements were allowed to contain ul elements, the browser would have to imply </p> when it sees <div> and would need to treat the ul element as part of the p element - even if this wasn't the author's intent. We cannot know. And unlike in current browsers, the background color for the p element would extend to the ul element. So this would change the interpretation and, generally speaking, the rendering of existing pages, in a manner that cannot be assumed to have been the authors' intent. Introducing a new paragraph concept, say <par> element, would not have this problem, but it would have problems of its own. And the good old <p> element might feel rather lonely and rejected - and oddly named. -- Yucca, http://www.cs.tut.fi/~jkorpela/Received on Thursday, 10 March 2011 10:18:16 UTC
This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC