Welcome ðŸŽ‰

logo

ReactLMS

Search
Light Mode
Contact Us

2 min to read

Contact us

No results for your search.
Sorry, an unexpected error occurred

Concept


display is an important property in CSS used to control the display structure of a block, usually exists in the following two forms:


How to use


example

HTML

//block
<p>Hello</p>

//inline-block
<p class="box">Say</p>
<p class="box">Hi</p>







CSS

.box{
  display:inline-block;
}







Result

Hello

Say

Hi


In the example above, the p tag with content Hello will have a default display of block, so this tag will occupy the entire row, while the next 2 p tags, because they have intervened class to convert to inline-block, can be in the same row.



Read more
On This Page