Forum Moderators: open

Message Too Old, No Replies

Meaning of W3C HTML Validation Service Results

"inline element containing a block-level element"

         

misosoph

6:55 am on Jul 19, 2002 (gmt 0)

10+ Year Member


"Sorry, this document does not validate as HTML 4.0 Transitional."

"Error: element [...] not allowed here; possible cause is an inline element containing a block-level element."

I used the "..." above to replace H1, P, and HR, each of which provoked this error message.

What does "inline element containing a block-level element" mean? (I imagine that DIV and TABLE are "block-level" and H1, P, and HR are "inline elements"?)

Is

<div> [or <table>]
<h1> [or <p> or <hr>]

invalid HTML? Why?

Thank you.

pageoneresults

9:07 am on Jul 19, 2002 (gmt 0)

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



> I imagine that DIV and TABLE are "block-level" and H1, P, and HR are "inline elements"?

H1, P, and HR are Block Level Elements.

Block Level Elements [htmlhelp.com]

Inline Elements [htmlhelp.com]

Sounds like you have a block level element within an inline element and that is what is causing the validation problem.

misosoph

9:37 am on Jul 19, 2002 (gmt 0)

10+ Year Member



Thank you. I think that using these definitions I will be able to figure out what I have done wrong.

<added> Yes. I had <h1> and <hr> and <p> between <font> and </font> in several places. When I corrected this, the page validated. </added>

<super added> Is <table bordercolor="#######"> valid in any version of HTML? I had believed that this was an exclusively Internet Explorer attribute? </super added>