+ 2

What happens if you nest a block element inside an inline element?

24th Jun 2016, 7:45 AM
Leighton DeGoede
Leighton DeGoede - avatar
2 Respuestas
+ 2
NO ,It will not work as the display only changes how the element should be displayed, not the type of the element it is. So, inline element with display:block is not allowed to have other block elements inside it.
19th Oct 2016, 12:46 PM
Arnav Mathur
+ 1
It would be valid HTML5 but may not be semantically correct and is often not necessary. Some justified use may be to make a heading a link: <a href="#"><h1>A Heading</h1></a>
9th Jul 2016, 2:54 PM
ZinC
ZinC - avatar