473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to close the break BR tag

mariko
23
I was taught to write <br/> but then I was later told to write <br />. Which is the correct way and does it make a difference?
Mar 24 '10 #1

✓ answered by drhowarddrfine

@mariko,
I doubt you are serving xhtml and there is no such thing as <br/> in HTML so you should use <br>. Browsers treat <br/> as "tag soup" which is why it works, they're required to do the best they can with it.

7 5111
some tags don't have end {closing} tags, so its always better to close tags

writing <br /> is recommended by newer version of w3c {world wide web consortium}
Mar 24 '10 #2
Dormilich
8,658 Expert Mod 8TB
if you not only write, but serve XHTML it doesn’t matter if you write <br/>, <br /> or even <br></br>.
@MoinFaraz
I’d like to have a link for that.
Mar 24 '10 #3
mariko
23
It seems like it works no matter what I put. Why should it matter? Also, is it better to use css properties?
Mar 24 '10 #4
jkmyoung
2,057 Expert 2GB
Some people like to have a space in self closing tags to highlight them when looking through the code.
I prefer conciseness so just put <br/>.
Mar 24 '10 #5
drhowarddrfine
7,435 Expert 4TB
@mariko,
I doubt you are serving xhtml and there is no such thing as <br/> in HTML so you should use <br>. Browsers treat <br/> as "tag soup" which is why it works, they're required to do the best they can with it.
Mar 24 '10 #6
@ mariko

i have always written in the old way...

which is <br> for opening and </br> for closing...

but <br /> is the new way but it won't matter if you are only using html and css but it will if you are using dhtml [aka, javascript, xhtml]

i recomend to use the old way for html...

many others will dissagree
Apr 9 '10 #7
Dormilich
8,658 Expert Mod 8TB
@MusoFreak200
it’s not the "new" way, it is an empty element in XML

@MusoFreak200
well, I don’t. always use the proper style. (not something like writing XHTML and serving it as HTML)
Apr 9 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steve Jorgensen | last post by:
An Access database connected to a PostgreSQL back-end. Sometimes, when I close a form, i get a message saying that the action will reset the current code in break mode. The front-end literally...
10
by: Jim H | last post by:
I sometimes get the following error from my Form's Dispose Method when the application is closing: ------------------------------------------------- An unhandled exception of type...
7
by: Nikki | last post by:
Hi, Can anybody help me, i want to prevent windows to close my winform of ..NET application, when user presses Alt+F4
6
by: Simon Harris | last post by:
Hi All, Do I need to use both Conn.Close() & Conn.Dispose() when I have finished with an SQL connection? -- I am using the free version of SPAMfighter for private users. It has removed...
7
by: Alice | last post by:
Hi, In my program, the user can navigate to many different forms. When they go to the next form, I want the form they have left to close. However, the forms aren't closing. Can anyone tell me...
35
by: Eric Sabine | last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET connection object, SQLConnection to be exact) and then I came across the following in some microsoft code. If Not cn Is Nothing...
10
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to...
9
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" +...
3
by: rdemyan via AccessMonster.com | last post by:
Sometimes users (including myself) accidentally click on the application close icon in the application menu bar when they meant to just click on the 'X' for the form. Of course the app closes and...
29
by: Neil | last post by:
I would like to compact on close only if the database size goes over a certain amount, rather than each time. Thus, I'd like to check the file size and then perform the compact through code as the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.