Forum Moderators: open

Message Too Old, No Replies

Strong tags and BR

valid or invalid

         

smallcompany

6:33 am on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Would this be valid:

<p><strong>text<br />
text</strong></p>

or it has to be:

<p><strong>text</strong><br />
<strong>text</strong></p>

or both is fine?

I'm just trying to reduce the amount of code wherever and whenever I can.

Thanks

tedster

9:11 am on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When in doubt, use the free validator service provided by the W3C.

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]

What you asked about specifically - using a <br> within another tag is valid.

smallcompany

6:41 pm on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is what I call "deep thinking" when I talk to my kids. It seems Dad needs to go back to school, too. :)

I do use the W3C validation and yet was not able to figure that when I posted my question.

This means I've got spoiled, just like many kids do.

Thanks Tedster.

phranque

8:12 am on Jan 13, 2009 (gmt 0)