tito11 tito11 - 1 year ago 129
HTML Question

How to make html ignore code that is part of text?

I need to include some codes in my html document

I've tried

tag, but that didn't help.

How do I get this code into a document like text?


Answer Source

Short Answer.

Encode your code using an online HTML Encoder and then put it inside pre

    <%--your encoded code goes here--%>

Long Answer.

The above will only help you to show your code. If you want proper highlighting for your code, Try something like SyntaxHighlighter

Link: How to use SyntaxHighlighter.