Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On Tue, 14 Jun 2011, Markus Ernst wrote: Am 14.06.2011 09:32 schrieb Ian Hickson: On Fri, 11 Mar 2011, Markus Ernst wrote: Instead of a new paragraph concept, there could also be a new concept for inline (resp. Phrasing Content) lists. The concept is actually not too new - for quotes, e.g., we've had both block levelblockquote and an inline levelq elements for long. Why not the same for lists? Consider this markup of Andy's use case: pI always like to eat these cheeses: il iliCheddar/ili, iliStilton/ili, and iliRed Lester/ili, /il but I enjoy them most with one of these biscuits: il iliwheat crackers/ili, ilirye crackers/ili, ilidigestives/ili, /il and some chutney./p il stands for inline list,ili for inline list item (it's a pity we can't reuseli for BC reasons). Conforming UAs would be required to ignore any content in anil element, except it is in anili element. Like that, the above example would be perfectly readable in legacy UAs, but make sense in HTML5-capable UAs. It would even be easy to stlye the output for legacy UAs supporting display:list-item, as this example illustrates: http://www.markusernst.ch/stuff_for_the_world/list-test.html What problem does this solve? It solves the first use case Jukka mentioned in his original post: Am 10.03.2011 09:20 schrieb Jukka K. Korpela: The p element (ever since it became an element) has always allowed inline (text-level) content only, and no change is planned to this in HTML5. Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? I would respectfully suggest that this isn't a real problem. On Tue, 14 Jun 2011, Tab Atkins Jr. wrote: It solves the first use case Jukka mentioned in his original post: So does Hixie's answer of Tell them to use two ps and a ul. His answer has the benefit of not requiring any changes to HTML, and not introducing a fourth type of list that is only very subtly different from ul. Indeed. On Wed, 15 Jun 2011, Markus Ernst wrote: This results in: div class=p pI always like to eat these cheeses:/p ul liCheddar/li, liStilton/li, and liRed Lester/li, /ul pbut I enjoy them most with one of these biscuits:/p ul liwheat crackers/li, lirye crackers/li, lidigestives/li, /ul pand some chutney./p /div I don't like this, because it is a hackish workaround for a quite basic problem. I don't understand what the hack is here. It looks fine to me. Lots of HTML is actually authored by non-programmers using online rich text editors - both the editor softwares and their users will be quite hard to teach about using such constructs. I strongly assume that the following kind of solution is more likely to occur: p style=margin-bottom:0I always like to eat these cheeses:/p ul style=margin:0 liCheddar/li, liStilton/li, and liRed Lester/li, /ul p style=margin:0but I enjoy them most with one of these biscuits:/p ul style=margin:0 liwheat crackers/li, lirye crackers/li, lidigestives/li, /ul p style=margin-top:0and some chutney./p I'd encourage classes rather than inline styles, but if the page really does have lists like this that don't have margins while also having lists that do have margins, then yes, that would be the way to do it. What's the problem here? The main issue here is the fact that you can't just apply styling to the list element, but have to apply it to the surrounding ps, too. Inline lists would make this kind of things definitely easier and better. I don't see why. Seems like semantic hair-splitting to me. You can do the styling for this fine using just CSS today (and it'll be even easier in the future with new forward-looking selectors), no need for complicated markup with lists inside paragraphs, etc. Of course I understand the benefit of not requiring any changes to HTML, but actually the HTML5 process is about making changes to HTML. Only for the changes that are worth it. I don't have a big problem with using this kind of markup either, but the same applies for using divs instead of articles and sections. The difference is that there's real gains to using section and article, far beyond just semantic purity. (e.g. automatic outlines, easier document maintenance in the face of significant edits, enabling automated syndication, etc.) On Tue, 14 Jun 2011, Andy Mabbett wrote: On 14 June 2011 08:32, Ian Hickson i...@hixie.ch wrote: On Thu, 10 Mar 2011, Jukka K. Korpela wrote: Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? That paragraphs don't contain lists; when a sentence has * this * structure, ...it is in fact two paragraphs and a bullet list. I think that's an opinion, not a fact. It's a fact, given the definition of
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
2011-06-14 10:32, Ian Hickson wrote: On Thu, 10 Mar 2011, Jukka K. Korpela wrote: [...] A sentence in the text may continue with list items, displayed e.g. as a bulleted list. So the list breaks the paragraph as a block of text but not logically - the list items are part of the sentence just as they would be if they were just mentioned in the text, for example using 1) numbers in the text, 2) letters in the text, or 3) no special notation. Indeed, but block of text is pretty much what a paragraph is -- it isn't a logical construct. The word paragraph is ambiguous, as he current wording says indirectly but clearly: It defines The p element represents a paragraph, but the word paragraph links to the following: The term paragraph as defined in this section is distinct from (though related to) the p element defined later. The paragraph concept defined here is used to describe how to interpret documents. A paragraph is typically a run of phrasing content that forms a block of text with one or more sentences that discuss a particular topic, as in typography, but can also be used for more general thematic grouping. For instance, an address is also a paragraph, as is a part of a form, a byline, or a stanza in a poem. So it says that p is a paragraph, linking to an explanation that says paragraph is different from p. The explanation mentions the term paragraph as defined in this section, but it does not give a definition - a sentence that begins with A paragraph is typically is a prelude to a definition, not a definition. I gather that The p element represents a paragraph more or less means the p element denotes a block of text. Can you make this more explicit, please? This is very confusing even to people who regularly read specifications for breakfast. In the current wordings, there are _two_ dimensions of vagueness of paragraph: whether it is the classical concept of text that discusses one topic or the layout concept roughly corresponding to the old HTML block concept; and whether it is about explicitly marked-up elements (p.../p) or more generally about constructs whose paragraphness might be inferred by some rules. It would probably be best to dispense with the word paragraph, as many people can't avoid thinking that paragraph is something logical, not the layout concept of a block of text. Nut unfortunately, in HTML heritage, the p element is not _purely_ a block of text. In addition to the name and old descriptions, it associates with the logical concept of paragraph, since p elements have default top and bottom margins. So they differ from div elements. A div element containing only text can be characterized as a block of text, and so can a p element, but there's a difference. Maybe something like the following might express this: The p element represents a block of text so that consecutive p elements are regarded as topically distinct. The name p comes from paragraph, and the p element typically corresponds to a paragraph in prose, i.e. a subdivision of text that deals with one point or gives the words of one speaker in a discussion. However, the p element is also used for other thematic grouping, for example for a byline, a mailing address, for a label and associated field in a form, for a byline, or for a stanza in a poem. Visual browsers are expected to render p elements by default with empty lines before and after, caused by default top and bottom margin. a) for styling purposes (you need a container element so that you can specify, without clumsily using classes on both the P and the UL, e.g. that vertical spacing be reduced or zero) div handles this case: divThis sentence ol licontains lia list /ol ...and is made of four paragraphs but can be styled as one since the lt;div element is used instead oflt;p./div But if this follows, for example, a table, then extra measures would be needed to create vertical spacing. Using the p element would make the spacing the default. Similarly for spacing after this construct. So it would be more robust to use p.../p markup here. Or you would need to assign style properties to the div element, effectively making it formatted the same way as p elements normally are, in your document. I don't think anonymous blocks of text are a good idea. There was a reason why they were frowned upon in HTML 4.01. After years of favoring p.../p as a container, as opposite to the original idea that allowed p as an empty element indicating paragraph break, it seems odd to give so many examples with loose text. So I hope an example like the above but with p.../p markup can be added, to answer the common question (which is often formulated in terms of a list header, but it's really about something that starts as a paragraph and then moves to listing things down as a bulleted list). Maybe an explanation like this might be added (perhaps even after the definition of
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
Am 14.06.2011 18:06 schrieb Tab Atkins Jr.: On Tue, Jun 14, 2011 at 2:04 AM, Markus Ernstderer...@gmx.ch wrote: Am 14.06.2011 09:32 schrieb Ian Hickson: On Fri, 11 Mar 2011, Markus Ernst wrote: Consider this markup of Andy's use case: pI always like to eat these cheeses: il iliCheddar/ili, iliStilton/ili, and iliRed Lester/ili, /il but I enjoy them most with one of these biscuits: il iliwheat crackers/ili, ilirye crackers/ili, ilidigestives/ili, /il and some chutney./p ilstands for inline list,ilifor inline list item (it's a pity we can't reuselifor BC reasons). Conforming UAs would be required to ignore any content in anilelement, except it is in anilielement. Like that, the above example would be perfectly readable in legacy UAs, but make sense in HTML5-capable UAs. It would even be easy to stlye the output for legacy UAs supporting display:list-item, as this example illustrates: http://www.markusernst.ch/stuff_for_the_world/list-test.html What problem does this solve? It solves the first use case Jukka mentioned in his original post: Am 10.03.2011 09:20 schrieb Jukka K. Korpela: Thep element (ever since it became an element) has always allowed inline (text-level) content only, and no change is planned to this in HTML5. Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? So does Hixie's answer of Tell them to use twops and aul. His answer has the benefit of not requiring any changes to HTML, and not introducing a fourth type of list that is only very subtly different fromul. Am 15.06.2011 09:09 schrieb Jukka K. Korpela: div class=p pThis is text, which may be just list header (introduction to the list) or a longer presentation. ul lian item/li lianother item/li /ul pHere we may have text that logically continues the discussion of the topic./p /div * * * I know this suggestion is long and raw, but I hope its basic content is something we can agree on. And I have no big problem with using div markup here, even though it somewhat goes against the spirit of modern HTML. This results in: div class=p pI always like to eat these cheeses:/p ul liCheddar/li, liStilton/li, and liRed Lester/li, /ul pbut I enjoy them most with one of these biscuits:/p ul liwheat crackers/li, lirye crackers/li, lidigestives/li, /ul pand some chutney./p /div I don't like this, because it is a hackish workaround for a quite basic problem. Lots of HTML is actually authored by non-programmers using online rich text editors - both the editor softwares and their users will be quite hard to teach about using such constructs. I strongly assume that the following kind of solution is more likely to occur: p style=margin-bottom:0I always like to eat these cheeses:/p ul style=margin:0 liCheddar/li, liStilton/li, and liRed Lester/li, /ul p style=margin:0but I enjoy them most with one of these biscuits:/p ul style=margin:0 liwheat crackers/li, lirye crackers/li, lidigestives/li, /ul p style=margin-top:0and some chutney./p The main issue here is the fact that you can't just apply styling to the list element, but have to apply it to the surrounding ps, too. Inline lists would make this kind of things definitely easier and better. Of course I understand the benefit of not requiring any changes to HTML, but actually the HTML5 process is about making changes to HTML. I don't have a big problem with using this kind of markup either, but the same applies for using divs instead of articles and sections.
[whatwg] Interpretation issue: can section be used for extended paragraphs?
On Thu, 10 Mar 2011, Jukka K. Korpela wrote: The p element (ever since it became an element) has always allowed inline (text-level) content only, and no change is planned to this in HTML5. Actually a change was planned, and executed, early on in the development of HTML5. It had to be reverted for various reasons, a long time before we dropped the 5, even. One of the reasons was that it wasn't necessary. Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? That paragraphs don't contain lists; when a sentence has * this * structure, ...it is in fact two paragraphs and a bullet list. A paragraph, in the old typographic sense, may contain lists. That is a somewhat debatable point, but luckily it is also somewhat orthogonal to the real issues you raise. A sentence in the text may continue with list items, displayed e.g. as a bulleted list. So the list breaks the paragraph as a block of text but not logically - the list items are part of the sentence just as they would be if they were just mentioned in the text, for example using 1) numbers in the text, 2) letters in the text, or 3) no special notation. Indeed, but block of text is pretty much what a paragraph is -- it isn't a logical construct. It's quite possible, if rare, for a sentence to span paragraphs even without lists being involved... Take, for instance, the first... ...no, the second... ...no, the third, of these blocks of text. That sentence spans three paragraphs. That's not a problem, IMHO. The HTML(5) paragraph concept is different, so in HTML terms, such a paragraph would need to consist of a P element followed by a UL (or OL) element. Indeed. There is an apparent need for indicating in markup that the two belong to together, We need more than an apparent need, we need a concrete real need, before we add a feature. a) for styling purposes (you need a container element so that you can specify, without clumsily using classes on both the P and the UL, e.g. that vertical spacing be reduced or zero) div handles this case: divThis sentence ol licontains lia list /ol ...and is made of four paragraphs but can be styled as one since the lt;div element is used instead of lt;p./div Note that the semantics turn out the same as if you'd used ps in there as well, as in: divpThis sentence/p ol lipcontains/p lipa list/p /ol p...and is made of four paragraphs but can be styled as one since the lt;div element is used instead of lt;p./p/div ...because of the definition of paragraph in HTML now. b) to ease handling in scripts Could you give a concrete example of why scripts would need to manipulate paragraphs in this way? c) to act as documentation in the source code, warning future editors of the document that neither the P element nor the UL element should be edited in isolation but only considering the other part as well. Isn't that pretty obvious from the fact that the sentence spans multiple elements? I mean, if an editor is ignoring the very prose that they are editing, I don't think any amount of markup can really save them. There are less apparent needs, or possibilities, too - e.g., 1) to communicate to any interested software that the elements are coupled, treating occurrences of a word as occurring in the same extended paragraph for the purposes of indexing, searching, etc., Can you give a concrete example of this? 2) to tell a grammar checker that the P element just _appears_ to end abruptly), A grammar checker, much like a human, would presumably operate on the text itself and could therefore easily detect that the sentence spanned multiple elements (or at least, as easily as if the sentence used phrasing elements in the same places). 3) to inform editing software that e.g. triple-clicking the paragraph, for the purpose of moving it elsewhere, should also select the UL element. It's not clear that this is desireable, but if it is, then div with a class specific to the editor would be able to handle this case, as far as I can tell. It's hard to know without more specifics. I guess some of these needs, especially the most practical (in a sense) styling issue, could be addressed by simply putting the P and UL elements inside a SECTION element: That would be abuse of section semantics, but it's the right idea. Just use div instead. Should this even be mentioned, descriptively, as a common use case, or as an example of inappropriate use, depending on the position that will be taken? If it's something that's actually important, I'm happy to mention the div trick. Let me know if you think that would help. On Thu, 10 Mar 2011, Andy Mabbett wrote: Consider a more complex scenario: pI always like to eat these cheeses:/p ul liCheddar liStilton liRed Lester /ul pbut I enjoy them most with one of these
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
Am 14.06.2011 09:32 schrieb Ian Hickson: On Fri, 11 Mar 2011, Markus Ernst wrote: Instead of a new paragraph concept, there could also be a new concept for inline (resp. Phrasing Content) lists. The concept is actually not too new - for quotes, e.g., we've had both block levelblockquote and an inline levelq elements for long. Why not the same for lists? Consider this markup of Andy's use case: pI always like to eat these cheeses: il iliCheddar/ili, iliStilton/ili, and iliRed Lester/ili, /il but I enjoy them most with one of these biscuits: il iliwheat crackers/ili, ilirye crackers/ili, ilidigestives/ili, /il and some chutney./p il stands for inline list,ili for inline list item (it's a pity we can't reuseli for BC reasons). Conforming UAs would be required to ignore any content in anil element, except it is in anili element. Like that, the above example would be perfectly readable in legacy UAs, but make sense in HTML5-capable UAs. It would even be easy to stlye the output for legacy UAs supporting display:list-item, as this example illustrates: http://www.markusernst.ch/stuff_for_the_world/list-test.html What problem does this solve? It solves the first use case Jukka mentioned in his original post: Am 10.03.2011 09:20 schrieb Jukka K. Korpela: The p element (ever since it became an element) has always allowed inline (text-level) content only, and no change is planned to this in HTML5. Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example?
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On 14 June 2011 08:32, Ian Hickson i...@hixie.ch wrote: On Thu, 10 Mar 2011, Jukka K. Korpela wrote: Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? That paragraphs don't contain lists; when a sentence has * this * structure, ...it is in fact two paragraphs and a bullet list. I think that's an opinion, not a fact. Indeed, but block of text is pretty much what a paragraph is -- it isn't a logical construct. Cite? The Oxford English Dictionary would seem to disagree with you: A distinct passage or section of a text, usually composed of several sentences, dealing with a particular point, a short episode in a narrative, a single piece of direct speech, etc. It's quite possible, if rare, for a sentence to span paragraphs even without lists being involved... Take, for instance, the first... ...no, the second... ...no, the third, of these blocks of text. That sentence spans three paragraphs. My view is that that's one paragraph, with line breaks. Consider: I like apples, pears, grapes, but not bananas. Nor do I like peaches. and: I like * apples * pears * grapes but not bananas. Nor do I like peaches. The difference between those two is presentational, not semantic. Each is a single paragraph. -- Andy Mabbett @pigsonthewing http://pigsonthewing.org.uk
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On Tue, Jun 14, 2011 at 2:04 AM, Markus Ernst derer...@gmx.ch wrote: Am 14.06.2011 09:32 schrieb Ian Hickson: On Fri, 11 Mar 2011, Markus Ernst wrote: Consider this markup of Andy's use case: pI always like to eat these cheeses: il iliCheddar/ili, iliStilton/ili, and iliRed Lester/ili, /il but I enjoy them most with one of these biscuits: il iliwheat crackers/ili, ilirye crackers/ili, ilidigestives/ili, /il and some chutney./p il stands for inline list,ili for inline list item (it's a pity we can't reuseli for BC reasons). Conforming UAs would be required to ignore any content in anil element, except it is in anili element. Like that, the above example would be perfectly readable in legacy UAs, but make sense in HTML5-capable UAs. It would even be easy to stlye the output for legacy UAs supporting display:list-item, as this example illustrates: http://www.markusernst.ch/stuff_for_the_world/list-test.html What problem does this solve? It solves the first use case Jukka mentioned in his original post: Am 10.03.2011 09:20 schrieb Jukka K. Korpela: The p element (ever since it became an element) has always allowed inline (text-level) content only, and no change is planned to this in HTML5. Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? So does Hixie's answer of Tell them to use two ps and a ul. His answer has the benefit of not requiring any changes to HTML, and not introducing a fourth type of list that is only very subtly different from ul. On Tue, Jun 14, 2011 at 7:22 AM, Andy Mabbett a...@pigsonthewing.org.uk wrote: Consider: I like apples, pears, grapes, but not bananas. Nor do I like peaches. and: I like * apples * pears * grapes but not bananas. Nor do I like peaches. The difference between those two is presentational, not semantic. Each is a single paragraph. Well, in standard English, the prose list would actually read I like apples, pears, and grapes, but not bananas.. You'd have to somehow mark up and hide the and when presenting it as a structured list instead of a prose list. This suggests that there *is* a semantic difference between the two. It's a subtle difference, to be sure, but it's there. More importantly, what problem is caused by having to mark up those two cases slightly differently? ~TJ
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On 6/14/11, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Jun 14, 2011 at 2:04 AM, Markus Ernst derer...@gmx.ch wrote: Consider: I like apples, pears, grapes, but not bananas. Nor do I like peaches. and: I like * apples * pears * grapes but not bananas. Nor do I like peaches. The difference between those two is presentational, not semantic. Each is a single paragraph. Well, in standard English, the prose list would actually read I like apples, pears, and grapes, but not bananas.. You'd have to somehow mark up and hide the and when presenting it as a structured list instead of a prose list. This suggests that there *is* a semantic difference between the two. It's a subtle difference, to be sure, but it's there. The difference isn't semantical. I'm not educated about archaic English, but in my language, all items were seperated by an ok, as in eppli ok perur ok greip but nowadays the norm is to somehow hide all the oks but the last one (probably for brevity). HTML has more structure, and can nest lists without ambiguity, so the and is unnecessary. However, if rendering lists inline, and thereby loosing this structural nature of lists is desired, it's the job of CSS. ul liapples lipears ligrapes /ul but not bananas. With the following stylesheet: ul { display: inline; } ul li :after { content: ', '; } ul li:last-child :before { content: 'and'; } ul li:last-child :after {content: '';}
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On Thu, Mar 10, 2011 at 1:58 PM, Andy Mabbett a...@pigsonthewing.org.ukwrote: On 10 March 2011 08:20, Jukka K. Korpela jkorp...@cs.tut.fi wrote: what should we say to people to need to use paragraphs that contain lists, for example? This has concerned me for some time. Consider a more complex scenario: pI always like to eat these cheeses:/p ul liCheddar liStilton liRed Lester /ul pbut I enjoy them most with one of these biscuits:/p ul liwheat crackers lirye crackers lidigestives /ul pand some chutney./p What I would like to be able to do is: pI always like to eat these cheeses: ul liCheddar liStilton liRed Lester /ul but I enjoy them most with one of these biscuits: ul liwheat crackers lirye crackers lidigestives /ul and some chutney./p Now I'm hungry :-( The problem here lies not on the list elements but rather on the paragraph. Consider the use cases where, instead of a list, the paragraph is split by a table, blockquote or pre. Semantically speaking, what is happening is that the paragraph is being interrupted by some other kind of information. An UA that is smart enough can imply this occurrence by the usage of the colon at the end of the paragraph. Those UAs can take into account these use cases and build a better outline for the document. Even though in the semantic structure of the document the list/table/quote/etc happens to be inside the paragraph, in the physical structure of the document the list/table/quote/etc is not inside the paragraph. Take into consideration how we write: we use the colon as a full stop pause, introduce the in-between element leaving a space, then resume the paragraph leaving another space after the in-between element. PS: This is my first message to the list, and since I've only been lurking for a short while, I'm not sure if it's customary to introduce oneself before intervening in the discussions. I'm sorry if I did, in fact, break any custom of this list, just blame it on the noob factor. Anyway, I'm just a web developer, anything else can be easily found out with fill in with your favorite search engine.
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
James Graham wrote: On 03/10/2011 09:20 AM, Jukka K. Korpela wrote: My question is: Is this acceptable use of the SECTION element, even in a flow that mostly consists of P elements, not wrapped inside SECTION elements of their own? If I understand you correctly, it is not the intended use of section — i.e. section conveys a different semantic to the one that you want — and could have a number of undesirable consequences. In particular it would insert a (presumably untitled) entry into the document outline. That's a good point that had not occurred to me. On the other hand, this outline thing seems to be somewhat theoretical for the time being... Browsers haven't implemented it, and the few online outliners I've seen mentioned seem to respond by cryptic error messages. This is astonishing, because the idea seems to be fairly simple. Then again, the outline concept virtually exists in HTML 4, too. You can construct a section nesting tree on the basis of the implicit sectioning defined by heading elements. But that's not something that browsers do, or authors care about. Maybe HTML5 changes this, somehow. But, admittedly, it would go against the intuitive idea of section to divide, say, a section so that some components are sections and some are just paragraphs, lists, or something. What if I used section markup for _all_ paragraphs in some context? Suppose I have section consisting of p elements, some of which are coupled with ol or ul elements (or something else). Then could divide the entire contents into inner sections, each containing either a single paragraph or a paragraph and something else. This sounds logically solid, though clumsy. The inner sections would effectively be extended paragraphs, just with a simple p element as the sole content in trivial cases. I don't think a solution to your problem currently exists. I am somewhat skeptical that a solution is urgently required (that is, I don't think I have used a tool that *actually* fails if I have to split a paragraph to accommodate a list). The immediate problems (of styling) can be handled using div markup. It just sounds so unstructured, and we have been told to use div as the last resort only... -- Yucca, http://www.cs.tut.fi/~jkorpela/
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On 3/11/11, Jukka K. Korpela jkorp...@cs.tut.fi wrote: James Graham wrote: On 03/10/2011 09:20 AM, Jukka K. Korpela wrote: My question is: Is this acceptable use of the SECTION element, even in a flow that mostly consists of P elements, not wrapped inside SECTION elements of their own? If I understand you correctly, it is not the intended use of section — i.e. section conveys a different semantic to the one that you want — and could have a number of undesirable consequences. In particular it would insert a (presumably untitled) entry into the document outline. That's a good point that had not occurred to me. On the other hand, this outline thing seems to be somewhat theoretical for the time being... Browsers haven't implemented it, and the few online outliners I've seen mentioned seem to respond by cryptic error messages. This is astonishing, because the idea seems to be fairly simple. Then again, the outline concept virtually exists in HTML 4, too. You can construct a section nesting tree on the basis of the implicit sectioning defined by heading elements. But that's not something that browsers do, or authors care about. Maybe HTML5 changes this, somehow. Table of contents may be quite useful, from time to time, and there are at least a few implementations generating them [http://www.niquelao.net/headingsmap-my-firefox-addon/]. But, admittedly, it would go against the intuitive idea of section to divide, say, a section so that some components are sections and some are just paragraphs, lists, or something. What if I used section markup for _all_ paragraphs in some context? Suppose I have section consisting of p elements, some of which are coupled with ol or ul elements (or something else). Then could divide the entire contents into inner sections, each containing either a single paragraph or a paragraph and something else. This sounds logically solid, though clumsy. The inner sections would effectively be extended paragraphs, just with a simple p element as the sole content in trivial cases. Sounds harmful to me. This brakes assumptions the outline algorithm, probably among other things, rely on.
[whatwg] Interpretation issue: can section be used for extended paragraphs?
The p element (ever since it became an element) has always allowed inline (text-level) content only, and no change is planned to this in HTML5. Under these circumstances, what should we say to people to need to use paragraphs that contain lists, for example? A paragraph, in the old typographic sense, may contain lists. A sentence in the text may continue with list items, displayed e.g. as a bulleted list. So the list breaks the paragraph as a block of text but not logically - the list items are part of the sentence just as they would be if they were just mentioned in the text, for example using 1) numbers in the text, 2) letters in the text, or 3) no special notation. The HTML(5) paragraph concept is different, so in HTML terms, such a paragraph would need to consist of a P element followed by a UL (or OL) element. There is an apparent need for indicating in markup that the two belong to together, a) for styling purposes (you need a container element so that you can specify, without clumsily using classes on both the P and the UL, e.g. that vertical spacing be reduced or zero) b) to ease handling in scripts c) to act as documentation in the source code, warning future editors of the document that neither the P element nor the UL element should be edited in isolation but only considering the other part as well. There are less apparent needs, or possibilities, too - e.g., 1) to communicate to any interested software that the elements are coupled, treating occurrences of a word as occurring in the same extended paragraph for the purposes of indexing, searching, etc., 2) to tell a grammar checker that the P element just _appears_ to end abruptly), 3) to inform editing software that e.g. triple-clicking the paragraph, for the purpose of moving it elsewhere, should also select the UL element. I guess some of these needs, especially the most practical (in a sense) styling issue, could be addressed by simply putting the P and UL elements inside a SECTION element: section pSometimes a paragraph isn't just a paragraph but continues with a list that may be/p ul lia bulleted list lia numbered list lia list constructed in some other way. /ul /section (I know that the period at the end of the last item violates English style rules. But it is allowed and even required by style rules of other languages, and at the logical level, it really belongs there - grammatically, the last sentence of the paragraph really ends there, not earlier.) My question is: Is this acceptable use of the SECTION element, even in a flow that mostly consists of P elements, not wrapped inside SECTION elements of their own? That is, can we use, e.g. within the BODY or within a SECTION, mixed content in the sense that it partly has P elements as direct descendants, partly has them wrapped in SECTION elements that are basically just extended paragraphs? Or should DIV markup be used instead? Should this even be mentioned, descriptively, as a common use case, or as an example of inappropriate use, depending on the position that will be taken? -- Yucca, http://www.cs.tut.fi/~jkorpela/
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On 03/10/2011 09:20 AM, Jukka K. Korpela wrote: My question is: Is this acceptable use of the SECTION element, even in a flow that mostly consists of P elements, not wrapped inside SECTION elements of their own? If I understand you correctly, it is not the intended use of section — i.e. section conveys a different semantic to the one that you want — and could have a number of undesirable consequences. In particular it would insert a (presumably untitled) entry into the document outline. I don't think a solution to your problem currently exists. I am somewhat skeptical that a solution is urgently required (that is, I don't think I have used a tool that *actually* fails if I have to split a paragraph to accommodate a list).
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
On 10 March 2011 08:20, Jukka K. Korpela jkorp...@cs.tut.fi wrote: what should we say to people to need to use paragraphs that contain lists, for example? This has concerned me for some time. Consider a more complex scenario: pI always like to eat these cheeses:/p ul liCheddar liStilton liRed Lester /ul pbut I enjoy them most with one of these biscuits:/p ul liwheat crackers lirye crackers lidigestives /ul pand some chutney./p What I would like to be able to do is: pI always like to eat these cheeses: ul liCheddar liStilton liRed Lester /ul but I enjoy them most with one of these biscuits: ul liwheat crackers lirye crackers lidigestives /ul and some chutney./p Now I'm hungry :-( -- Andy Mabbett @pigsonthewing http://pigsonthewing.org.uk
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
Am 10.03.2011 17:58 schrieb Andy Mabbett: On 10 March 2011 08:20, Jukka K. Korpelajkorp...@cs.tut.fi wrote: what should we say to people to need to use paragraphs that contain lists, for example? This has concerned me for some time. Consider a more complex scenario: pI always like to eat these cheeses:/p ul liCheddar liStilton liRed Lester /ul pbut I enjoy them most with one of these biscuits:/p ul liwheat crackers lirye crackers lidigestives /ul pand some chutney./p What I would like to be able to do is: pI always like to eat these cheeses: ul liCheddar liStilton liRed Lester /ul but I enjoy them most with one of these biscuits: ul liwheat crackers lirye crackers lidigestives /ul and some chutney./p I was annoyed by the exact same issue several times, too. Anyway it looks to me that this problem raised by Jukka Korpela applies mainly to the three list-type elements ol, ul and dl. Would it cause serious issues to add the Phrasing Content category to these three elements, thus allowing them inside the p element? In 3.2.5.1.5 I don't find anything on the expected rendering of Phrasing Content, so I assume UAs would not have to change the default rendering to be conforming. The content model of the li element would have to be added something like only Phrasing Content, if the element is in a context where Phrasing Content is expected. I also don't see serious backwards compatibility breaks, except that the lists of Andy's example would be rendered with top and bottom margins in legacy UAs. (I apologize if this is a silly suggestion for any reason - I can see things only from the author perspective.)
Re: [whatwg] Interpretation issue: can section be used for extended paragraphs?
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 psome textul.../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/