If you would like an example of using google-code-prettify on websites (aka html instead of md), then fork this repo and render the html (They use the Monokai color syntax theme)
<div id="code-example"> <h1>My First Heading</h1> <p>My first paragraph</p> </div>
Notice you do not need any link or script, it is provided by Github (hint you must be looking at the md for this section):
AVOID: You can of course attempt to reference link and script tags, but they will not render if not inside the pre tag
<div id="code-example"> <h1>My First Heading</h1> <p>My first paragraph</p> </div>
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/un5t0ppab13/prettyprint/master/monokai_for_google_prettyprint.css">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<div id="code-example"> <h1>My First Heading</h1> <p>My first paragraph</p> </div>
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/un5t0ppab13/prettyprint/master/monokai_for_google_prettyprint.css"> <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> <div id="code-example"> <h1>My First Heading</h1> <p>My first paragraph</p> </div>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script><div id="code-example"> <h1>My First Heading</h1> <p>My first paragraph</p> </div>
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/un5t0ppab13/prettyprint/master/monokai_for_google_prettyprint.css">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<pre class="prettyprint lang-html">
<div id="code-example">
<h1>My First Heading</h1>
<p>My first paragraph</p>
</div>
</pre>
AVOID: If you use 4 spaces on all code including the <pre>, even with < AND > you will just see the code without color syntax:
<pre class="prettyprint lang-html">
<div id="code-example">
<h1>My First Heading</h1>
<p>My first paragraph</p>
</div>
</pre>
<pre class="prettyprint lang-html">
<div id="code-example">
<h1>My First Heading</h1>
<p>My first paragraph</p>
</div>
</pre>
AVOID: Notice if you don't use < instead of < and > instead of > AND indent all code by 4 spaces you will no longer render the html but, you still will not see code color syntax:
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/un5t0ppab13/prettyprint/master/monokai_for_google_prettyprint.css">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<pre class="prettyprint lang-html">
<div id="code-example">
<h1>My First Heading</h1>
<p>My first paragraph</p>
</div>
</pre>
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/un5t0ppab13/prettyprint/master/monokai_for_google_prettyprint.css">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<pre class="prettyprint lang-html">
<div id="code-example">
<h1>My First Heading</h1>
<p>My first paragraph</p>
</div>
</pre>
AVOID: But if you do that but skip the pre tags, It 'works', just don't, bc any code following it is stuck, notice that everything after is using githubs code 'blocks':
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/un5t0ppab13/prettyprint/master/monokai_for_google_prettyprint.css">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<div id="code-example"> <h1>My First Heading</h1> <p>My first paragraph</p> </div>### SUMMATION: Don't use \< or \> for \tags --- [google-code-prettify](https://code.google.com/p/google-code-prettify/wiki/GettingStarted#Serving_your_own_JS_&_CSS) --- ## License All rights reserved Copyright (C) 2015 Un5t0ppab13 [Check out my profile page page](http://github.com/un5t0ppab13).