News for hackers. Stuff that matters.
Re:Writing HTML by Hand by foobarbecue on Wednesday September 20, 2023 @08:24AM (#37583298)
You mean </br>, presumably.
Re:Writing HTML by Hand by throwaway_no on Wednesday September 20, 2023 @08:30AM (#37583334)
<br /> is a self closing tag. This is used in XML / XHTML for elements that have no contents.

It is a valid short form of <br></br>

Re:Writing HTML by Hand by thinkingemote on Wednesday September 20, 2023 @08:35AM (#37583368)
technically <br></br> is not allowed to have an end tag in the HTML spec

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br

so it should be <br> on its own or <br />

Re:Writing HTML by Hand by naniwaduni on Wednesday September 20, 2023 @11:03AM (#37585110)
A silly corner of the spec, considering that this is a spec that specifies exactly how to handle e.g. misnested elements and admits plenty of other things that read intuitively as standardized sloppiness.
Re:Writing HTML by Hand by midasuni on Wednesday September 20, 2023 @08:30AM (#37583336)
No. <br></br> is shortened to <br/>
Re:Writing HTML by Hand by foobarbecue on Wednesday September 20, 2023 @11:29AM (#37585445)
Wow, thanks everyone... it seems I've misunderstood this all these years.
Re:Writing HTML by Hand by pests on Wednesday September 20, 2023 @07:20PM (#37591354)
You see this a lot in React/JSX too. Saves seme typing and noise inserting a component with no children.