Grow your CSS skills. Land your dream job.

how to display HTML code in blog post?

  • # December 1, 2009 at 3:15 am

    Hi guys,
    Sorry if i filled the question under the wrong category.

    I would like to know what solutions are out there for displaying code in a blog post. I’m specifically interested in something like this:
    http://css-tricks.com/app-from-scratch-4-html-css/
    http://net.tutsplus.com/tutorials/html- … e-website/ – see the code snippets down the page

    Thanks allot
    Sebi

    # December 1, 2009 at 9:53 am

    Basicly you wrap the code within <pre> and <code> tags </code> </pre>.

    Although that will fix most of it, what will not be fixed are the <tags> with the < and > . To fix those you gotta use a plugin or custom function to htmlentities(); all code within <code> tags.


    TeMc

    # December 19, 2009 at 7:01 am

    If you are using wordpress then there are syntax highlighter plugins. You can try that.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".