Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7614933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:31:42+00:00 2026-05-31T02:31:42+00:00

I am using Prettify.js and css for my web site but it is not

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:31:43+00:00Added an answer on May 31, 2026 at 2:31 am

    You have to change < to &lt; and > to &gt; otherwise your code gets rendered by the browser. So your code has to look like this:

    <pre class="prettyprint">
      &lt;div style="padding:3px 0px"&gt;
        &lt;asp:Label ID="lblTotalAns" runat="server" Text="0 Answers" CssClass="ansHeading" /&gt;
      &lt;/div&gt;
    </pre>
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am wondering using Zend Framework's view helpers, ... code below ... $this->headLink()->prependStylesheet(css/style.css) ->prependStylesheet(css/prettify.css)
I have an HTML form consisting of some text-inputs. I'm using jqTransform to prettify
Im trying to get pretty.js to prettify code in CODE tags, using this js:
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm using Prettify for syntax highlighting, but it doesn't work on dynamically generated code.
Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
I am using prettify: <pre class=prettyprint linenums> some code </pre> It works but the
I'm using Googles excellent Code Prettify and I'm quite happy with it. But: Does
I want to style a form in html using CSS. It's a really simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.