title: How to assign a css class to echo $output
body: <p>How can I assign a CSS class to echo $output</p>
  
  <p>I am currently trying this code: </p>
  
  <pre><code>    echo '&lt;p class="errormsg"&gt;' . $output . '&lt;/p&gt;';
  </code></pre>
  
  <p>And my CSS: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.errormsg {
      color: red;
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I dont get parse errors, but the CSS doesnt do anything. Any idea how this might work? Tried several solutions I have found here, but they dont work either.</p>