XHTML Strict: br label inside p tag

I get a lot of validation errors due to the <p> inside. If I remove the br tags, then it works fine.

Why is this creating a problem?

+6
html css w3c-validation
source share
1 answer

Not that br is inside p , but you don't end br character / . Do you have <br> in code when it should be <br/> . This is why the validation error is "end tag for" br "omitted," it tells you that you did not end the tag correctly with /.

Note that in HTML4 you do not need to close the br tag with an end slash, but in XHTML it is required as a plain tag.

+16
source share

All Articles