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

How to get newline in HTML? Without BR

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.