title: Custom Css class in confluence
body: <p>I want to apply custom css class to the HTML tags in confluence. I tried adding css class in HTML macro as well as in css Macro. but the style is reflecting only in the preview, when i save and view the page style is not available, any advice</p>
  <p><strong>HTML Macro:</strong></p>
  <pre><code> &lt;head&gt;
        &lt;style&gt;
          .myClass {
            padding: 18px;
            background-color: Grey;
          }
        &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;div class=&quot;myClass&quot;&gt;
          &lt;p&gt;Answer will be posted here.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/body&gt;
  </code></pre>
  <p><strong>Css Macro</strong></p>
  <pre><code>.myClass{
    padding:  18px;
    background-color: Grey;
  
  }
  </code></pre>
  <p>Preview
  <a href="https://i.stack.imgur.com/QU13c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QU13c.png" alt="enter image description here" /></a></p>
  <p>When i save and publish</p>
  <p><a href="https://i.stack.imgur.com/A9vfl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A9vfl.png" alt="enter image description here" /></a></p>