Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>SyntaxHightlighter Example</title>
  <script src="https://problogizjs.googlecode.com/files/highlight.pack.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>
  
</head>
<body>
  <h2>Contoh SyntaxHightlighter CSS</h2>
<pre><code>  
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  body:first-of-type pre::after {
    content: 'highlight: ' attr(class);
  }
}
@import url('print.css');
@page:right {
 margin: 1cm 2cm 1.3cm 4cm;
}
@font-face {
  font-family: Chunkfive; src: url('Chunkfive.otf');
}
div.text,
#content,
li[lang=ru] {
  font: Tahoma, Chunkfive, sans-serif;
  background: url('hatch.png') /* wtf? */;  color: #F0F0F0 !important;
  width: 100%;
}
</code></pre>
    <h2>Contoh SyntaxHightlighter Javascript</h2>
<pre><code> 
function $initHighlight(block, flags) {
  try {
    if (block.className.search(/\bno\-highlight\b/) != -1)
      return processBlock(block, true, 0x0F) + &#039; class=&quot;&quot;&#039;;
  } catch (e) {
    /* handle exception */
    var e4x =
        &lt;div&gt;Example
            &lt;p&gt;1234&lt;/p&gt;&lt;/div&gt;;
  }
  for (var i = 0 / 2; i &lt; classes.length; i++) { // &quot;0 / 2&quot; should not be parsed as regexp
    if (checkCondition(classes[i]) === undefined)
      return /\d+/g;
  }
}
</code></pre>
    <h2>Contoh SyntaxHightlighter HTML</h2>
<pre><code>   
 &lt;!DOCTYPE html&gt;
&lt;title&gt;Title&lt;/title&gt;
&lt;style&gt;body {width: 500px;}&lt;/style&gt;
&lt;script type=&quot;application/javascript&quot;&gt;
  function $init() {return true;}
&lt;/script&gt;
&lt;body&gt;
  &lt;p checked class=&quot;title&quot; id=&#039;title&#039;&gt;Title&lt;/p&gt;
  &lt;!-- here goes the rest of the page --&gt;
&lt;/body&gt;
  
</code></pre>
  
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
problogizpro
0viewers