difference between  <br> and <br /> tag?

Started by rakkhi sharma, January 31, 2011, 02:12:08 AM

rakkhi sharma

hi can anyone tell me the difference between  <br> and <br /> tag?

Webhelpforums

Simplified:

<tag /> (XHTML)
same as
<tag></tag> (XHTML/HTML)
same as
<tag> (HTML)
TechSEO360 | MicrosysTools.com  | A1 Sitemap Generator, A1 Website Analyzer etc.

WebDeveloper

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.

ritakriti

#3
Yes this is true..if it is non closing tag then it is an html else XHTML.

jony123

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 />.


sophia123

For HTML web designer <br >  tag is useful for new line. If you use XHTML then you must close <br > tag by  <br /> tag.

John23

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.

Delois

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.


johnanne

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.

siyajoshi

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..:)