0
breaking tag
what is the difference between <br/> and <br> tags ?
2 ответов
+ 6
<tag/> was the required shorthand way to write self-closing and empty tag in XHTML (Html version based on XML specifications) standard, and was supported in oldest Html versions to be more easily compatible with XML requirements, but is no more a valid notation in latest Html5, even if browsers auto-correct this kind of "malformed" syntax... <br/> should work, but it's advised today to use <br> instead, as well as <img src="" alt=""> rather than <img src="" alt=""/> (that's right obviously for all no-content tags -- <hr>, <input> and so on)
+ 5
In XHTML, there must be a slash. In HTML, it doesn't matter.