Print Page | Close Window

Use "<br />" or "<br>"?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2932
Printed Date: 01 April 2026 at 5:33am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Use "<br />" or "<br>"?
Posted By: Mikael
Subject: Use "<br />" or "<br>"?
Date Posted: 22 May 2003 at 1:50am
What is the differences between "<br />" and "<br>"? I saw that microsoft started to use the / in the end of theirs html-tags a year ago, and now it's used in ver 7 of this forum too...



Replies:
Posted By: Allan_Young
Date Posted: 22 May 2003 at 2:26am

As I understand it the only difference is <br> relates to pure HTML whereas <br /> relates to the new XHTML.

Anyone designing web pages should really be using XHTML code now, other differences like including / in image tags, like <img src="myimage.gif" width="10" height="10" />



-------------
Everyone has a photographic memory, its just that some are out of film


Posted By: pedalcars
Date Posted: 22 May 2003 at 5:20am
Correct. In XHTML and XML unterminated tags are forbidden, so eg:

<p>First paragraph

<p>Second paragraph

is illegal, even though most browsers will display it correctly. Paragraphs must be terminated with </p>.

However, not all tags are paired, such as <br>, <hr> and <img ...> to name a few. These must be written as <br />, <hr /> and <img ... />, etc.

The space before the closing / is also essential, as <br/> (etc) without the space will confuse browsers.

More info a www.w3.org

-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net