+ 6
Do you close your <img>, <br> and <hr> tags?
In HTML5 void elements are not required to be closed, that means <br> and <br /> are treated the same. Nevertheless i prefer to use the latest one to make clear I do not expend a closing tag. What version do you prefer to use?
9 Respostas
+ 9
I depend on users choice but both are same.
+ 7
Hello, Jorge
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
+ 7
I prefer the latter.
+ 5
I'hv noticed not using of closing tags create unexpected rendering issues on old-browsers like IE and IE based browsers. Also low-end browsers like JAVAME Version of Opera Mini creates problem. Its better to close tags if you are targeting those browsers.
+ 5
True
+ 5
it is optional
I just don't bring it
+ 4
According to the current version of html that is html5 you don't need to add / before the closing bracket. For example <br> will work same as <br/>
+ 3
<br> a leg