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

Breaks inside <dd> and <dt> tags?

P: n/a
In a markup like

<dd> <br> some other stuff <br> </dd>

the first break seems to add a blank line before the other stuff, but
the second doesn't add a blank line after the other stuff. The same
seems to hold for <dt>.

Is this a universal rule, or does it apply to many other HTML
constructs? Is there some logical reason for it?

Thanks, AES
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"AES/newspost" <si*****@stanford.edu> wrote in message
news:si***************************@news.stanford.e du...
In a markup like

<dd> <br> some other stuff <br> </dd>

the first break seems to add a blank line before the other stuff, but
the second doesn't add a blank line after the other stuff. The same
seems to hold for <dt>.

Is this a universal rule, or does it apply to many other HTML
constructs? Is there some logical reason for it?


Some browsers ignore a <br> that's at the end of a block if the new line
would be empty. You can fix the problem by putting a non-breaking space
afterwards.

Better yet would be to use styles to pad the top and bottom of the <dd> ,
which seems to be what you want to do, instead of using <br>.

Jul 20 '05 #2

P: n/a
In article <2h************@uni-berlin.de>,
"Harlan Messinger" <h.*********@comcast.net> wrote:
Better yet would be to use styles to pad the top and bottom of the <dd> ,
which seems to be what you want to do, instead of using <br>.


Thanks much; looks like I'll have to get at it and learn styles.

Sure would be nice if HTML provided for simple "macro tags" in the
manner of TeX, e.g. if there were something analogous to the TeX \def
("macro define") command such that one could just put in the Head
section something like

Define <myDD> = <DD><BR>

and the problem would be solved.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.