I am trying to use prettyprint to format the UI of my code but I am not getting any formatting done.
HTML:
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css" rel="stylesheet">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
</head>
<body onload="prettyPrint()">
<pre class="prettyprint">
<div> This is a div </div>
<a href="http://www.google.com">Bollywood </a >
</pre>
</body>
</html>
References:
Can someone please help me out?
I want the default layout in the 3rd link provided.
Try this:
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css">
<style type="text/css"></style><link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/google/code-prettify/master/loader/prettify.css">
</head>
<body>
<pre class="prettyprint linenums">
<div> This is a div </div>
<a href="http://www.google.com">Bollywood </a >
</pre>
</body>
</html>
An online demo is available here.
The desired theme must be included as a css file (for example, this css file).