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?
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://net.tutsplus.com/tutorials/html- … e-website/ – see the code snippets down the page
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.
If you are using wordpress then there are syntax highlighter plugins. You can try that.