Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other how to display HTML code in blog post?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27002
    sebinski
    Member

    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:
    https://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

    #67339
    TeMc
    Member

    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

    #68313
    synn
    Member

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.