hi can anyone tell me the difference between <br> and <br /> tag?
Simplified:
<tag /> (XHTML)
same as
<tag></tag> (XHTML/HTML)
same as
<tag> (HTML)
Yes.. in HTML there is no need to close some tags like <br>, <hr> and <img> but in XTML we have to close all the tags so you can write <br> in HTML and <br /> in XTML. Using XHTML is a good practise.
Yes this is true..if it is non closing tag then it is an html else XHTML.
If u want to go new line you use <br> tag in HTML.
There is no end tag of <br> tag in HTML.
But in XHTML the <br> tag must be properly closed, like <br />.
For HTML web designer <br > tag is useful for new line. If you use XHTML then you must close <br > tag by <br /> tag.
Quote from: Webhelpforums on January 31, 2011, 06:44:43 AM
Simplified:
<tag /> (XHTML)
same as
<tag></tag> (XHTML/HTML)
same as
<tag> (HTML)
I think this is the best answer. Moderator has explained really good.
The difference is that <br> tag is used in the HTML while <br /> tag is used in XHTML. HTML gives flexibility for not closing the tag but in the XHTML it is compulsory to close the tag.
What about </br> tag?
This both tag are HTML tag and it is in pair tag. With this tag you can break line and start in new line. <BR> is the starting tag of HTML and than you have to complate this tag with use of <BR/> tag. But HTML provide facility that did not close this tag.
Hello...
<br> is used in HTML, the <br/> is used in XHTML. They are not compatible (you must use the first in HTML only, and the second in XHTML only).
Thnx..:)