Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more context around the permissibility of the XHTML slash on void elements #9642

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -117428,10 +117428,14 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
data-x="foreign elements">foreign element</span>, then there may be a single U+002F SOLIDUS
character (/), which on <span>foreign elements</span> marks the start tag as self-closing. On
<span>void elements</span>, it does not mark the start tag as self-closing but instead is
unnecessary and has no effect of any kind. For such void elements, it should be used only with
caution — especially since, if directly preceded by an <a href="#unquoted">unquoted attribute
value</a>, it becomes part of the attribute value rather than being discarded by the
parser.</li>.
unnecessary, has no effect of any kind, and is permitted merely to facilitate migration from
XHTML. Newly-created markup that does not have a connection to XHTML is expected not to use it
on <span>void elements</span>, and the <span>HTML fragment serialization algorithm</span> does
not generate it on <span>void elements</span>. The U+002F SOLIDUS character (/) interacts poorly
with another syntax feature: if directly preceded by an <a href="#unquoted">unquoted attribute
value</a>, it becomes part of the attribute value rather than being discarded by the parser on
<span>void elements</span> or marking a <span data-x="foreign elements">foreign element</span> as
self-closed.</li>.

<li>Finally, start tags must be closed by a U+003E GREATER-THAN SIGN character (&gt;).</li>
</ol>
Expand Down