CSS Display Inline/Block Example

  • Post category:CSS

Get the code of CSS Display Inline/Block Example and watch video tutorials. You can practice using our code editor. Our practical guide will make your learning journey much easier. You can explore the tutorial and learn.

<p class="one">
	<span>Text</span>
  <span>Text</span>
  <span>Text</span>
</p>
<p class="two">
	<span>Text</span>
  <span>Text</span>
  <span>Text</span>
</p>
p {
  background: blue;
  color: white;
  padding: 5px;
}
.one {
  display: block;
}
.two {
  display: inline;
}
p.one span {
  background: red;
}
p.two span {
  background: green;
}