Arno Welzelwrote:
> Robert Prins:
>
>>
https://prino.neocities.org/sandbox.html
>>
>> The first four lines use <br><br> the last four <p>
>>
>> Why, on the <p> lines doesn't get <details> inlined???
>
> Because this is a block element like <table> or <blockquote> and not an
> inline element like <em>, <img> etc..
To put it more explicitly, the <details> tag for that reason implicitly
closes the open <p> element, as if the markup were
<p>x. This is a </p><details ...>...
And text after the closing </details> tag is just “loose text”, text
directly inside the <body> element, and not part of any <p> element.
This happens when the browser parses the HTML code, so you cannot affect
this in CSS.
If you wish to have both text and a <details> element inside a
paragraph-like container, don’t use <p> but a <div> element with a
suitable class, and style it like a paragraph.