By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,246 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,246 IT Pros & Developers. It's quick & easy.

<br />

P: n/a
Hello,

Why are there sometimes tags written like this:

<br />

instead of the normal:

<br>

What is the reason of the extra "/" ?

Thank you.
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
brucie wrote:
Empty elements must either have an end tag or the start tag must end
with />.


Thank you!

Jul 20 '05 #2

P: n/a
in post <news:3f**********************@reader3.news.skynet .be>
ahlala said:
Why are there sometimes tags written like this:
<br />


XHTML

<quote>
Empty elements must either have an end tag or the start tag must end
with />. For instance, <br/> or <hr></hr>. See HTML Compatibility
Guidelines for information on ways to ensure this is backward compatible
with HTML 4 user agents.
</quote> http://www.w3.org/TR/xhtml1/#h-4.6

--
brucie
10/December/2003 11:31:46 am kilo
Jul 20 '05 #3

P: n/a
ahlala wrote:
brucie wrote:

Empty elements must either have an end tag or the start tag must end
with />.

Thank you!

That is only in XHTML! For HTML is it perfectly valid to have <br>

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #4

P: n/a
CJM
Anne,

If you check Brucie's post again, you'll see he does explicitly mention
XHTML.

CJM
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.