The <br> tag or <br />
Solved
faamugol
-
rwaness -
rwaness -
Hello,
What is the difference between the <br> tag and the <br /> tag?
Why use one and not the other?
Thank you in advance,
What is the difference between the <br> tag and the <br /> tag?
Why use one and not the other?
Thank you in advance,
2 answers
Hello,
the second form comes from XHTML, which is the latest standard for web page structures, the rule being that every tag must be opened and every tag must be closed.
Tags like br, which did not have a closing form in HTML, must therefore be opened and closed at the same time, giving
and this form should be preferred
it's the same for a tag like img:
Best regards
the second form comes from XHTML, which is the latest standard for web page structures, the rule being that every tag must be opened and every tag must be closed.
Tags like br, which did not have a closing form in HTML, must therefore be opened and closed at the same time, giving
<br />
and this form should be preferred
it's the same for a tag like img:
<img src="image.gif" />
Best regards
Will this cause any problems later on?
Thank you in advance,
The document will then be HTML and not XHTML. If the document is XHTML (see DTD, etc.), it could cause issues.