467,077 Members | 872 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

Breaks inside <dd> and <dt> tags?

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
  • viewed: 4546
Share:
2 Replies

"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
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.

Similar topics

6 posts views Thread by The Plankmeister | last post: by
9 posts views Thread by Akseli Mki | last post: by
4 posts views Thread by Andre Majorel | last post: by
25 posts views Thread by Shannon Jacobs | last post: by
16 posts views Thread by Ian Rastall | last post: by
3 posts views Thread by Andy Dingley | last post: by
9 posts views Thread by David Trimboli | last post: by
nathj
5 posts views Thread by nathj | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.