Using the code shortcode, you can easily add html, css, or any other markup to your site like this:

<div class="example" style="color:#333333">This is an example of the code shortcode. And interestingly enough, we are using the code shortcode to show you how to use the code shortcode (so meta).</div>

Code

[code]<div class="example" style="color:#333333">This is an example of the code shortcode. And interestingly enough, we are using the code shortcode to show you how to use the code shortcode (so meta).</div>[/code]

Options

  • id: add a unique ID to the shortcode.
  • class: add a class or multiple classes to the shortcode.
  • style: add inline styles to the shortcode.
  • sanitize: set to “true” to escape special characters.