• CAn anyone please explain whats happening?

    From Robert Prins@21:1/5 to All on Mon Jan 18 11:25:55 2021
    XPost: comp.infosystems.www.authoring.stylesheets

    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???

    Robert
    --
    Robert AH Prins
    robert(a)prino(d)org
    The hitchhiking grandfather - https://prino.neocities.org/indez.html
    Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arno Welzel@21:1/5 to All on Mon Jan 18 11:53:10 2021
    XPost: comp.infosystems.www.authoring.stylesheets

    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..

    Also see <https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element>


    --
    Arno Welzel
    https://arnowelzel.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jukka K. Korpela@21:1/5 to All on Mon Jan 18 13:23:09 2021
    XPost: comp.infosystems.www.authoring.stylesheets

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)