On Sep 29, 2022, at 2:23 PM, Omar KN <omne...@gmail.com> wrote:
> 
> So now BREAK should be only <br> in HTML5.
> 
> Until a week ago the w3 corrector marked <br /> as the only correct way.
> 
> w3: 
> "Self-closing tag syntax in text/html documents is widely discouraged." Some 
> for 

If you’re using <!doctype HTML>, you’re writing HTML5.

According to the HTML5 specs at https://html.spec.whatwg.org/ 
<https://html.spec.whatwg.org/>, (dated September 28, 2022) Section 13.1.2.1, 
Start tags:

        • After the attributes, or after the tag name if there are no 
attributes, there may be one or more ASCII whitespace. (Some attributes are 
required to be followed by a space. See the attributes section below.)
        • Then, if the element is one of the void elements, or if the element 
is a foreign element, then there may be a single U+002F SOLIDUS character (/). 
This character has no effect on void elements, but on foreign elements it marks 
the start tag as self-closing.
        • Finally, start tags must be closed by a U+003E GREATER-THAN SIGN 
character (>).

The enumeration of void elements in section 13.1.2 lists br as a void element.

Therefore, at least in the eyes of WHATWG, the slash is optional in a <br> tag.

Regards,
Neil Faiman

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/924D5CF6-FB92-432F-9AB2-FAD0810A4E15%40faiman.org.

Reply via email to