W3C home > Mailing lists > Public > public-html@w3.org > November 2010

Re: ISSUE-128 (figure-in-p): Chairs Solicit Proposals

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Mon, 1 Nov 2010 22:34:43 +0100
To: Ian Hickson <ian@hixie.ch>
Cc: Henri Sivonen <hsivonen@iki.fi>, HTML WG <public-html@w3.org>
Message-ID: <20101101223443638880.2227d2fd@xn--mlform-iua.no>
Ian Hickson, Mon, 1 Nov 2010 20:01:45 +0000 (UTC):
> On Mon, 1 Nov 2010, Henri Sivonen wrote:
>> On Oct 7, 2010, at 20:04, Ian Hickson wrote:
>>>> I think both kinds of figures are legitimate and authors should be 
>>>> able to use whichever way fits their current design.
>>> What are the two kinds of figures?
>> Figures that the author considers as being between paragraphs and 
>> figures that the author wants to put inside a paragraph in order to 
>> avoid working around the CSS consequences of having the figure element 
>> between paragraphs in the document tree when in layout it isn't supposed 
>> to look like being between paragraphs but alongside at least one of the 
>> paragraphs.
> That's a CSS difference, not one relevant to HTML.
> Furthermore, it's not even a real problem in CSS. The effect you describe 
> can trivially be achieved using features that have been implemented in all 
> browsers for years now without much if any manipulation of the markup.
> We shouldn't be designing HTML (a language that will be with us for 
> decades) around the short-term limitations of CSS. Problems in the 
> platform should be fixed correctly, not using band-aid techniques.

"CSS consequence" is not a synonym for "short-term limitation of CSS".

Btw, what is the correct way to fix it? And what is "it"? 

If the image looks to be inside the paragraph, because it is floated to 
the left, why must it then be placed outside the paragraph? Why is 
*that* "correct"? And what is so correct or helpful with the fact that 
if you place the image outside the paragraph, _then_ you can add a 
caption to it, while if you place it inside the paragraph, then you 
cannot? Why is that "correct"? 

I would say that the correct thing is to make sure that the author can 
add a caption to the image, whether or not the image is placed inside 
or outside the paragraph. 

The paragraph model of HTML has always seem illogical. I assuem that it 
was not accidental that QuirksMode allows for example tables inside <p> 
- it happened because it was a logical thing to do. We should try to 
remove any motivatino for wanting to use quirksmode, shouldn't we?

Allowing <figure> inside <p> can also, if the author so wants, simplify 
the structure of e.g .an article: E.g. one could place any table that 
the article may have, inside a <figure> and place all <figure>s inside 
a <p>-s. That way, it would become predictable what the table contains: 
Only h1-h6 and p elements. That, in turn, would make it simpler to 
style the article. 

E.g. currently, the author have know know all the possible elements the 
article could contain, in order to develope e.g. a consistent border or 
margin strucuture:


Instead, if <figure/> could reside inside <p>, then it would be 
possible to require all non-p-elemetns - except headings - to go inside 

    <p><figure><ol/   ></figure></p>
    <p><figure><dl/   ></figure></p>
    <p><figure                /></p>
    <p><figure><ul   /></figure></p>

Thus, the author would more easily get the exact same margins etc 
througout the article. A lot less headake when doign the styling and 
when thinking about the pieces that the article consists of. This would 
be simpler to style consistently. Just use 

	article > p {/*style*/}

as opposed to 

    article>table,article>you-name-it  {/*style*/}

Btw, already, we see lot of *lack of use* of the p element: Authors 
e.g. use two <br/><br/> instead. Or they use <div>paragraph</div> etc. 
And it is my claim that this is not only because of uneducated authors, 
but because the <p>-element is a lot less useful than it should be 
*exactly* because it spits out anythign that is illegal inside <p>.

You have defined what HTML5 means by "paragraph". [1] The definition 
there can be said to be wide - it is not necessary to use the <p> 
elemnt in order to form a paragraph. You show that <li/> elements can 
form paragraphs.  And you show that paragraphs can overlap when they 
appear inside fallback. It is therefore quite unclear to me why you 
would disallow <figure> inside <p>.

The spec's section about paragraphs ends with these words: [1] "To 
avoid this confusion, explicit p elements can be used." The only change 
that Henri's proposal would bring to those words would be that authors 
would also have to disallow them from using <figure/> inside the <p> 
elements, when avoding cofusion is sought.

PS: The last example in [1] is very instructive in showing how HTML5's 
current status could *encourage* authors to not use <p>. Desipie that 
you say in [1] that the text *surrounding* the <object/> (but not the 
text inside the <object/>) makes up an entire paragraph there is 
	a) no way to select this paragraph, other than by using a <div> 
element. (I don't know what you have in you CSS sleeve, but that 
doesn't make it more correct.)
	b) had you added a <p> to mark up that paragraph, then - in HTML5 (but 
not in HTML4), it would become illegal, as it would count as a <ul/> 
inside a <p>.

This is the code example from [1] that I talk about:

 <h1>My Cats</h1>
 You can play with my cat simulator.
 <object data="cats.sim">
  To see the cat simulator, use one of the following links:
   <li><a href="cats.sim">Download simulator file</a>
   <li><a href="http://sims.example.com/watch?v=LYds5xY4INU">Use online 
  Alternatively, upgrade to the Mellblom Browser.
 I'm quite proud of it.

In HTML4 one could do this:

 <h1>My Cats</h1>
 <p>You can play with my cat simulator.
 <object data="cats.sim">
  <p>To see the cat simulator, use one of the following links:</p>
   <li><a href="cats.sim">Download simulator file</a>
   <li><a href="http://sims.example.com/watch?v=LYds5xY4INU">Use online 
  <p>Alternatively, upgrade to the Mellblom Browser.</p>
 I'm quite proud of it.</p>

With Henri's proposal, we could do many things, for instance this:

 <h1>My Cats</h1>
 <p>You can play with my cat simulator.
   <object data="cats.sim">
    <p>To see the cat simulator, use one of the following links:</p>
     <li><a href="cats.sim">Download simulator file</a>
     <li><a href="http://sims.example.com/watch?v=LYds5xY4INU">
       Use online simulator</a>
    <p>Alternatively, upgrade to the Mellblom Browser.</p>
 I'm quite proud of it.</p>

Both the HTML4 solution and Henri's HTML5 solution allows us to mark up 
the structures that implicitly are there, with explicit code. This, 
Ian, is not currently permitted to do, in HTML5. And what the future of 
CSS might bring, is not an argument, because this is not about CSS but 
about HTML.

[1] http://dev.w3.org/html5/spec/content-models#paragraphs
leif halvard silli
Received on Monday, 1 November 2010 21:35:19 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:06 UTC