469,602 Members | 1,927 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

How to get newline in HTML? Without BR

In a TD, I would like to print 5 words one below the other. I know I
can use <BR/>. Is there any other way?
I tried and This seems to print "\r" and "\n" but not give
the effect of a new line.

I am actually doing this so that I can use the HTML content to export
to an Excel file. A BR introduces new Excel rows which is unwanted for
my requirement.

Thanks,
Yash
Jan 24 '08 #1
2 47855
Yash wrote:
In a TD, I would like to print 5 words one below the other. I know I
can use <BR/>. Is there any other way?
Well with HTML you can try the pre element
<td><pre>foo
bar
baz
whatever
whatelse</pre></td>
but I have no idea whether that helps with your Excel problem described
below. And this is comp.lang.javascript, use
comp.infosystems.www.authoring.html for HTML authoring problems.

I am actually doing this so that I can use the HTML content to export
to an Excel file. A BR introduces new Excel rows which is unwanted for
my requirement.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jan 24 '08 #2
Yash wrote:
I am actually doing this so that I can use the HTML content to export
to an Excel file. A BR introduces new Excel rows which is unwanted for
my requirement.
How are you getting from the HTML to the Excel format? I can think of at
least two ways. Whichever way you are doing it, it is wrong for the <BR>
to be interpreted as a new Excel row. It should be interpreted as a
newline inside the Excel cell.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Jan 24 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by marslee | last post: by
reply views Thread by Ken Pinard | last post: by
1 post views Thread by Newsgroup Reader | last post: by
2 posts views Thread by Asterbing | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.