What You See...
Up until this point, we have relied upon an element’s default value of being inline or block-level to define whether it would be presented next to other elements horizontally or placed beneath previous elements in a new “block”.
When not addressed, the default behavior of block-level elements (like <div>
, <p>
, <li>
, etc) is for them to generate as chunks of content linearly down the page. This is what keeps two paragraphs from running into each other, for example. However, there are many times we may want elements to relate differently. We can change this with the display property.
CSS
div {
display: ;
}
- Previous
- Next