+ 2

Which one is more correct 1) <br> OR 2) <br/>

This is related to HTML coding

28th Jun 2018, 10:46 AM
UJWAL
4 odpowiedzi
+ 3
Hello, Ladoo ! Depending on the specification: for DOCTYPE HTML, it will be correct <br>, for DOCTYPE XHTML - <br/>. For XHTML it is typical to put a slash before the closing bracket in single tags: <br/>, <hr/>, <input/>, etc. Writing </br> - is incorrect, because BR is a single tag, and a slash after the opening bracket is for closing descriptors only. https://www.sololearn.com/learn/HTML/1028/?ref=app
28th Jun 2018, 10:52 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 2
Both are correct. However in React.js, use <br />, all tags must have closing tag.
28th Jun 2018, 10:53 AM
Calviղ
Calviղ - avatar
+ 2
They are both correct. You just has to be coherent. I mean, if you start using one, go with it. don't use the two in the same site.
28th Jun 2018, 10:56 AM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
Thank you all for giving solutions to my query.....
29th Jun 2018, 5:35 PM
UJWAL