0

I try to use prismjs http://prismjs.com/download.html for code highlighting, but it is not working see this fiddle http://jsfiddle.net/939u16ac/ I am getting the rendered HTML instead of the markup PFA markup and Screenshot

HTML File:

<!doctype html>
<html lang="en">
    <head>
        <title> Demo</title>
        <meta charset="utf-8"/>
        <link rel="stylesheet" href="lib/prism.css">
        <script src="lib/prism.js"></script>
    </head>
    <body onload="">

<pre class="line-numbers language-markup">
<code  class="">
<ol type="1">
<li>
href atribute is must and id, class, title attribute are optional 
</li>
<li>
In angular application or you are not having any navigation link, use <b>javascript:void(0)</b> in href attribute value
</li>
</ol>
<a id="optionalID" class="optionalClass"  title="optionalTitle" href="Product.html" >Product Page</a>
</code>
</pre>
    </body>
</html>

enter image description here

Could any one spot me where i went wrong in implementing it?

Thanks in advance for any help.

Mohamed Hussain
  • 6,577
  • 14
  • 47
  • 78
  • 1
    You need to convert the ` – Harry Jun 25 '15 at 11:04
  • possible duplicate of [How to show
    tag literally in /
     tag?](http://stackoverflow.com/questions/11386586/how-to-show-div-tag-literally-in-code-pre-tag)
    – Harry Jun 25 '15 at 11:08
  • @Harry: Thanks for the help. It will be much better if the indentation and this conversion taken care by the code. Put it in the answer section. – Mohamed Hussain Jun 25 '15 at 11:13
  • Not adding an answer because the answer is going to be a dupe. Consider upvoting the answer in the linked thread (not mine) if it helped :) – Harry Jun 25 '15 at 11:17
  • @harry that question also seems duplicate, so mine is duplicate of duplicate :)....original Qn: http://stackoverflow.com/questions/42182/how-to-escape-and-inside-pre-tags... and i thought it is taken care by the sytnax highlighter tool – Mohamed Hussain Jun 25 '15 at 11:22
  • Hmm yeah. You are correct :) – Harry Jun 25 '15 at 11:23
  • Possible duplicate of [How to escape < and > inside
     tags](https://stackoverflow.com/questions/42182/how-to-escape-and-inside-pre-tags)
    – Matt O'Tousa Apr 19 '18 at 22:29

0 Answers0