Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Added wording to clarify retrictions on children of p elements. #838

Merged
merged 2 commits into from Mar 30, 2017

Conversation

adanilo
Copy link
Contributor

@adanilo adanilo commented Mar 29, 2017

Addresses issue #763 for paragraph element description.

@@ -165,6 +165,10 @@
This example still has five structural paragraphs, but now the author can style just the
<code>div</code> instead of having to consider each part of the example separately.
</div>

In general, elements that cannot be children of <{p}> elements includes any elements that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As elements is plural, I think includes should be include (no 's')

Copy link
Collaborator

@chaals chaals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with @agcolom's change in it this looks good.

@chaals chaals merged commit c5b7996 into w3c:master Mar 30, 2017
W3C-HTML-Bot pushed a commit that referenced this pull request Mar 30, 2017
@simevidas
Copy link

Could you clarify if this means that a <em style="display: inline-block"> inside a <p> is invalid?

@LJWatson
Copy link
Collaborator

LJWatson commented Apr 7, 2017

The spec restricts which HTML elements can be used inside the <p> element. It does not specify which CSS can be applied to those elements.

@simevidas
Copy link

simevidas commented Apr 7, 2017

But the way the note is written implies the use of CSS, doesn’t it?

In general, elements that cannot be children of p elements include any elements that are inline blocks, inline tables, as well as floated and positioned block-level elements.

Source: Section 4.4.1.

These scenarios can only be achieved with CSS, not with HTML alone, as far as I know.

@LJWatson
Copy link
Collaborator

LJWatson commented Apr 7, 2017

Good point. Do you have suggested wording? If not I'll defer to @adanilo

arronei pushed a commit to arronei/html that referenced this pull request Apr 17, 2017
)

* Added wording to clarify retrictions on children of p elements.

* Editorial change for plurality correction after review.
@SelenIT
Copy link

SelenIT commented Dec 15, 2017

For me, it seems that the current wording still implies that CSS can somehow influence on whether these elements can be contained in the paragraph or not. Moreover, it might give the impression to a novice that HTML has the concept of "inline-block elements" and "inline-table elements", in addition to HTML 4 concepts of "block elements" and "inline elements" that are still widely used by many educational resources despite the fact that HTML5 replaced them with the "kinds of content" concept.

Wouldn't it be better to stress the fact that CSS can't change the content model of the element at all, with some wording like this?

Elements that can't be children of <p> element can't be placed inside it regardless their styling, even if they are formatted as inline blocks, inline tables, floated or positioned elements, etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants