+ 5
Line Break
The lessons demonstrate to enter a <br/> for a line break. I noticed that I accidentally forgot to add the / at the end of <br>. This didn't seem to effect the HTML? Is this true throughout all HTML?
3 Answers
+ 6
In HTML (up to HTML 4): use <br>
In HTML 5: <br> is preferred, but <br/> and <br /> is also acceptable. In XHTML: <br /> is preferred. Can also use <br/> or <br></br>.
In HTML, the <br> tag has no end tag.
In XHTML, the <br> tag must be properly closed, like this: <br />.
FOR MORE:
https://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br
+ 6
<br> â HTML
<br /> â XHTML
+ 2
this is called the self ending tag......
You can see the same syntax of img tag also.......
"/" after br and img is optional at all......
<br> will give same output as <br />