<h1 class="padded-multiline">
  <span>How do I add padding to subsequent lines of an inline text element?</span>
.padded-multiline { 
  line-height: 1.4; 
  padding: 2px 0; 
  width: 400px;
  margin: 20px auto;
.padded-multiline span { 
  background-color: #c0c;
  color: #fff; 
  display: inline;
  padding: 0.45rem;
  /* Needs prefixing */
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;

body {
  padding: 1rem;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js