<br> is what you are supposed to do in HTML5

<br/> is from XHTML, a failed standard that even in its hey day never got
traction.

The only reason to ever use <br/> is if you are embedding html in an xml
format via namespaces. This is for example sometimes done in SVG.

So i would say always use <br>. However i would also say that i18n messages
probably shouldn't have this type of structural formatting in them in most
cases.

--
Brian

On Saturday, 28 February 2026, Amir E. Aharoni via Wikitech-l <
[email protected]> wrote:

> Hi,
>
> Some translatable messages in MediaWiki and extensions have <br> tags.
>
> Sometimes they are written as <br>, sometimes as <br />, and sometimes as
> <br/>. I would love to make it consistent across all the messages, but I'm
> not totally sure which form to choose.
>
> I recall that many years ago, I read an article that recommends using <br
> />, because it was the most compatible form with the various browsers and
> HTML standards.
>
> Things probably changed since then. From what I'm reading online now, the
> <br> form is probably the best.
>
> However, I might be wrong. Are there still any good reasons to use <br />
> or <br/> in 2026, or is it safe to switch to <br> everywhere?
>
> --
> Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
> http://aharoni.wordpress.com
> ‪“We're living in pieces,
> I want to live in peace.” – T. Moore‬
>
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to