![]() |
|
[Help] Showing Code in HTML? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Help] Showing Code in HTML? (/showthread.php?tid=3761620) |
Showing Code in HTML? - Programming - Sep 18, 2013 This sounds like a newbish question, but I want to show HTML code on my website. But since it is actual code, it doesn't show on the site and is hidden. Ex: "This is how you use a header: <h1> Hello </h1>" But it actually shows Hello using H1 and doesn't actually display <h1>. * - ASLR - Sep 18, 2013 Trying using the character codes for the symbols instead of straight up typing them. EDIT: Here, look at this http://stackoverflow.com/questions/6817262/how-to-display-html-tags-as-plain-text * - Aeal - Sep 18, 2013 You could also insert it into an image for all your examples, may make your website look a little better also. * - Webmasters - Sep 19, 2013 I believe you can put code into a certain kind of "box" that doesn't "execute" the code. Or you could always comment it in and tell them what to do. I'm not sure what the box is, I've saw it a few times on w3schools etc. * - Han. - Sep 19, 2013 EDIT: Scratch that. Just use < and > * - Blackājack - Sep 20, 2013 I believe you can wrap it in <pre> and </pre>, but I might be wrong. |