I want to display the Source code of Html page as it is written on the notepad so pls, How to prevent browser from parsing the code and display the original source code of the Html Page?
-
2Possible duplicate of How to display raw html code in PRE or something like it but without escaping itBeri– Beri2016-01-13 06:33:31 +00:00Commented Jan 13, 2016 at 6:33
-
Have you tried googling it? The simplest way is to escape it, but I assume that you would like to have same pretty formatting of this html.Beri– Beri2016-01-13 06:34:20 +00:00Commented Jan 13, 2016 at 6:34
Add a comment
|
2 Answers
You can use a Syntax Highlighter like this one: https://code.google.com/p/syntaxhighlighter/
Or you can use <code></code>
So <div class="helloworld"></div> would become:
<code><div class="helloworld"></div></code>
< and > stands for the less than and greater than brackets.