Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why can't I have a br after a closing table with Strict DTD 1

Status
Not open for further replies.

y2k1981

Programmer
Joined
Aug 2, 2002
Messages
773
Location
IE
I've been validating my pages on the W3C site, and the only error left which I can't fix is one that says I can't have a br after a closing table tag. why is this? Do I have to use a <p> instead?
 
I think a <br> has to be used within a block element like a <p>, <form> or <td>. In any case, you shouldn't need to put a <br> directly after </table> - you'll get a line break there by default anyway.

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
thanks Chris. I know that closing the table automatically provides a line break, but I want another break because the tables are too close together. Will I just have to put an additional tr at the bottom of the table with a non-breaking space instead?
 
Rather than add extraneous <p>s and <br>s, just add some CSS to the second table to build up its top margin:
[tt]
<table style=&quot;margin-top:2em&quot;>
[/tt]

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
cool, never thought of that !!

Thanks chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top