Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:0.5em;color:#dccf8f;background:url(https://cdn.jsdelivr.net/highlight.js/9.9.0/styles/pojoaque.jpg) repeat scroll left top #181914}
.hljs-comment,.hljs-quote{color:#586e75;font-style:italic}
.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-addition{color:#b64926}
.hljs-number,.hljs-string,.hljs-doctag,.hljs-regexp{color:#468966}
.hljs-title,.hljs-section,.hljs-built_in,.hljs-name{color:#ffb03b}
.hljs-variable,.hljs-template-variable,.hljs-class .hljs-title,.hljs-type,.hljs-tag{color:#b58900}
.hljs-attribute{color:#b89859}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-subst,.hljs-meta{color:#cb4b16}
.hljs-deletion{color:#dc322f}.hljs-selector-id,.hljs-selector-class{color:#d3a60c}
.hljs-formula{background:#073642}
.hljs-emphasis{font-style:italic}
.hljs-strong{font-weight:bold}

Contoh HTML, XML

<!DOCTYPE html>
<title>Title</title>

<style>body {width: 500px;}</style>

<script type="application/javascript">
  function $init() {return true;}
</script>

<body>
  <p checked class="title" id='title'>Title</p>
  <!-- here goes the rest of the page -->
</body>

Contoh JavaScript

function $initHighlight(block, cls) {
  try {
    if (cls.search(/\bno\-highlight\b/) != -1)
      return process(block, true, 0x0F) +
             ` class="${cls}"`;
  } catch (e) {
    /* handle exception */
  }
  for (var i = 0 / 2; i < classes.length; i++) {
    if (checkCondition(classes[i]) === undefined)
      console.log('undefined');
  }

  return (
    <div>
      <web-component>{block}</web-component>
    </div>
  )
}

export  $initHighlight;