I am using Prettify.js and css for my web site but it is not working for HTML
Let’s say I have HTML like this:
<div style="padding:3px 0px">
<asp:Label ID="lblTotalAns" runat="server" Text="0 Answers" CssClass="ansHeading" />
</div>
How it will render by prettify?
You have to change
<to<and>to>otherwise your code gets rendered by the browser. So your code has to look like this:I have created a simple example with your html source: http://jsfiddle.net/aSb76/
This can also be seen in prettify tests source and the result page.
The basic setup on howto include prettify.js is described in the README.
I have no clue about escaping in ASP, but the first search result in Google for something
like ‘asp encode html entities’ brought up
<%= Server.HTMLEncode(sValue) %>. Maybe you can use this.