<div class="container">
  <h1>The following content uses block and inline layout</h1>
  
  <p>Block elements extend to fill the container in the inline direction. They break onto a new line. Any inline elements such as a <span>span</span> do not break onto a new line.</p>
  
  <p>Unless you change the value of display, elements continue to display using these block and inline rules.</p>
  
</div>
body {
  padding: 20px;
  font: 1em Helvetica Neue, Helvetica, Arial, sans-serif;
}

span {
  color: rebeccapurple;
  font-weight: bold;
}

.container {
  margin: 0 auto;
  max-width: 700px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.