+ 1
Forward slash
Why does the app have a lot of tags with the closing forward clash in the back? Example <br/> ?? I’ve always seen it written like </br>
1 Odpowiedź
+ 4
br tag isn html ia an empty element that does not need to be closed, i.e it does not require an end tag, that is why they usually have the slash at their end <br/> but the slash is optional; you can put it or not, their is no effect. Elements like hr, input, br, !doctype amongst other are empty elements that dont require end tags.
But other elements require end tags and without closing them, well you may have your document having lots of errors, especially with some js code embedded to it, they must be closed, eg <p>...</p> amongst others.
Happy coding 😊 Keep coding 🙏