Html - Block Level Elements Inside Inline Elements - Stack Overflow

This question already has answers here: Is it wrong to change a block element to inline with CSS if it contains another block element? (9 answers) Closed 10 years ago.

The W3C Validator tells me I can't put block-level elements inside inline elements. Makes sense...

but what if I'm using CSS to change that block-level element into an inline element?

And what if I'm using CSS to convert an inline element into a block-level element (when inside another inline element)?

The Validator doesn't pick up on this obviously, but is it wrong?

(I'm not actually doing this, I'm just wondering about best-practice)

Từ khóa » Html Block Element Inside Inline