473,738 Members | 2,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why eliminate <br>?

I note in an Eric Meyers book that he expresses one goal of using CSS is
to eliminate all <brtags. Why?
--
Ed Jay (remove 'M' to respond by email)
Aug 2 '06 #1
56 3794
Ed Jay <ed***@aes-intl.comwrote:
>I note in an Eric Meyers book that he expresses one goal of using CSS is
to eliminate all <brtags.
If so then he is putting that to strongly.
>Why?
<bris an element with few appropriate uses, it's often abused to
insert blank lines or "pseudo paragraphs" when real paragraph markup
should be used, or spacing when CSS margins should be used, or to get an
element to have a line break before and after for which the element
should be set to "display:bl ock" instead.

But there are a few legitimate uses for using <br>, one example would be
to create a line break inside an <addresselement :

<address>
My name<br>
My address
<address>

--
Spartanicus
Aug 2 '06 #2
Spartanicus scribed:
>Ed Jay <ed***@aes-intl.comwrote:
>>I note in an Eric Meyers book that he expresses one goal of using CSS is
to eliminate all <brtags.

If so then he is putting that to strongly.
>>Why?

<bris an element with few appropriate uses, it's often abused to
insert blank lines or "pseudo paragraphs" when real paragraph markup
should be used, or spacing when CSS margins should be used, or to get an
element to have a line break before and after for which the element
should be set to "display:bl ock" instead.

But there are a few legitimate uses for using <br>, one example would be
to create a line break inside an <addresselement :

<address>
My name<br>
My address
<address>
Thanks.
--
Ed Jay (remove 'M' to respond by email)
Aug 2 '06 #3
Ed Jay <ed***@aes-intl.comscripsi t:
I note in an Eric Meyers book
Which book? Please cite by title and page.
that he expresses one goal of using CSS
is to eliminate all <brtags. Why?
Do you mean he does not explain that in the book?

I guess Eric refers to the common abuse of using successive <brtags to
create vertical spacing. That's clumsy, coarse and unreliable, so surely it
should be replaced by the use of CSS.

Besides, even legitimate uses of <brcan often be replaced by other markup,
usually <div>, and this may help in styling.

Eliminating all <brtags sounds like a misconception, though. It's
impossible to say whether it would be Eric's misconception or yours.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 2 '06 #4

Ed Jay wrote:
I note in an Eric Meyers book that he expresses one goal of using CSS is
to eliminate all <brtags. Why?
Because Eric Meyer has some very weird ideas about good HTML.

<bris good. It's an inline element, and it's literally there as a
"line break", for when you need this _within_ a block of text.

It's not a paragraph marker, not a delimiter for headers, and
especially not as a chunk of whitespace for spacing things apart. These
are abuses of <brand no-one should defend them, but the fact that
<brregularly gets mis-used doesn't mean that it should be removed.

"one goal of using CSS is to eliminate all mis-used <brtags" might
be a better phrasing.

Aug 2 '06 #5
On Wed, 2 Aug 2006, Jukka K. Korpela wrote:
Eliminating all <brtags sounds like a misconception, though.
Furthermore, <bris the recommended HTML equivalent for the
Unicode character U+2028 "line separator", which itself should
not be used in markup languages.
http://www.unicode.org/reports/tr20/#Suitable

Aug 2 '06 #6
Andy Dingley scribed:
>
Ed Jay wrote:
>I note in an Eric Meyers book that he expresses one goal of using CSS is
to eliminate all <brtags. Why?

Because Eric Meyer has some very weird ideas about good HTML.
This statement sounds rational. Not because I think Eric Meyer has weird
ideas, but I note that as I read newsgroups pertaining to HTML, javascript
and CSS, each camp thinks "their" methodology is the best, and others miss
the mark. Not quite as religiously as Windows versus Linux, but similar.
>
<bris good. It's an inline element, and it's literally there as a
"line break", for when you need this _within_ a block of text.

It's not a paragraph marker, not a delimiter for headers, and
especially not as a chunk of whitespace for spacing things apart. These
are abuses of <brand no-one should defend them, but the fact that
<brregularly gets mis-used doesn't mean that it should be removed.
Understood.
>
"one goal of using CSS is to eliminate all mis-used <brtags" might
be a better phrasing.
Works for me.

My pages are filled with <brtags, and I'm in no hurry to eliminate them
in favor of defining a bunch of new containers. When I read Meyer's
comment, I became concerned that I was going to be forced to rewrite, but
I couldn't understand why. Thanks all for your input.
--
Ed Jay (remove 'M' to respond by email)
Aug 2 '06 #7
Jukka K. Korpela scribed:
>Ed Jay <ed***@aes-intl.comscripsi t:
>I note in an Eric Meyers book

Which book? Please cite by title and page.
"Eric Meyer on CC," Page 5, 'Converting the Document,' 'Stripping Down to
the Minimum:' "Things to eliminate include: <brelements (also listed are
&nbsp; entities, font elements, and other stuff.)
>
>that he expresses one goal of using CSS
is to eliminate all <brtags. Why?

Do you mean he does not explain that in the book?
Not that I saw. I must admit, though, that I didn't scrutinize the entire
book. I read the statement and searched the following several pages, but I
saw no further mention of it.
>
I guess Eric refers to the common abuse of using successive <brtags to
create vertical spacing. That's clumsy, coarse and unreliable, so surely it
should be replaced by the use of CSS.
Could be.
>
Besides, even legitimate uses of <brcan often be replaced by other markup,
usually <div>, and this may help in styling.
Which is where I thought was the direction I was going to have to follow.
>
Eliminating all <brtags sounds like a misconception, though. It's
impossible to say whether it would be Eric's misconception or yours.
I'm willing to buy into any explanation that will save me from having to
do a lot of unnecessary markup. :-)

Thanks.
--
Ed Jay (remove 'M' to respond by email)
Aug 2 '06 #8
On Wed, 2 Aug 2006, I wrote:
http://www.unicode.org/reports/tr20/#Suitable
I realize only now:

http://www.unicode.org/reports/tr20/#Suitable
^^^^^^^^^
3 Characters not Suitable for use With Markup
^^^^^^^^^^^^
http://www.unicode.org/reports/tr20/#Format
^^^^^^^
4 Format Characters Suitable for Use with Markup
^^^^^^^^
One should be more careful with the naming of anchors :-(

Aug 2 '06 #9
Andy Dingley <di*****@codesm iths.comscripsi t:
<bris good.
Empty elements aren't good in a language that is expected to be a logical
markup language. They are procedural markup in disguise, or just
misdesigned.

We may have reasons to tolerate and use them, but let's not call them good.
It's an inline element, and it's literally there as a
"line break", for when you need this _within_ a block of text.
What does "line break" mean in speech, in Braille rendering, or to a search
engine?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 2 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7862
by: fis | last post by:
Hi all, I've problem because there are needed break lines in my texts on the web site but i can't do it :( My pipeline looks like: XMS -> I18N -> XSLT -> HTML I have lot of texts in my "languages" files and these are describes for things on my website. Example text looks like this:
6
12155
by: Lasse | last post by:
I have done this simple function, it seems to work as intended, to solve a problem i have had for a while. I couldnt find any sample around that was working for me. I would like to test it with you and see if there are any improvments that i should make ;-) It should be fast and if possible compatible with todays modern browser-standards. It should be activated by the onload-event. This is my code, free for all to use:
3
4272
by: Josh Lee | last post by:
Being the unpaid bum that i am, i am creating a stylesheet for my livejournal. The heading of my page consists of a table cell spanning the entire width of my page, with two lines of text inside. They are separated by a <br>, but i would like to combine them into a single line of text. Is it possible, using only css (because that's all i've got), to eliminate a br and turn it into a single line? I tried display:none but it didn't...
7
19157
by: noor.rahman | last post by:
I have an XML file that stores data from an HTML form. I use XSL to display the data in HTML format. The data may have newline characters. However, XSL is not displaying the newlines properly in the browser. I even replaced all the newlines with <BR/> tags but eventhough I see the tags in my source, I don't get a line break in the output document. Any help would be greatly appreciated.
7
2744
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no tags will remain making the page safe (I have to convert the linefeeds to <BR>s because the Server.EncodeHTML does not do that it seems). The problem is that users can use a special tag when editing the top to specify an area of the tip that will...
2
2533
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all the charcontrols option and chr(13) with success.. was using the following code: Dim s As String = MyTextbox.Text
1
3171
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all the charcontrols option and chr(13) with success.. was using the following code: Dim s As String = MyTextbox.Text
7
3624
by: Nathan Sokalski | last post by:
Something that I recently noticed in IE6 (I don't know whether it is true for other browsers or versions of IE) is that it renders <br/and <br></br> differently. With the <br/version, which is what most people use when they write static code (some people use <br>, but with xhtml you are required to close all tags), IE6 simply breaks to the next line like it is supposed to. However, with <br></br>, which is what is sometimes generated by...
0
8968
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9473
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9334
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.