Acmlm's Board - I2 Archive - Programming - Seen this on a few websites...
User | Post |
FreeDOS
Posts: 523/1657 |
Originally posted by HyperHacker -Use < in place of <. (You don't have to replace >.) This method's not so great for the board, because it'll replace it with the actual < character when you try to edit or quote the post.
Proper HTML-age would require you to replace > with > as well.
And the edit/quote thing would be a problem if Acmlm make all &'s as & in the textbox! |
HyperLamer
Posts: 956/8210 |
There's a few ways to do it... -Use an <xmp> tag. This tells the browser to display the HTML as text instead of rendering it. It does tend to stretch pages, however. -Put an invalid tag inside it. Example: <<cheese>font> becomes <font>. (This is how I usually do it.) This is somewhat risky, though, since it might not always work. -Use < in place of <. (You don't have to replace >.) This method's not so great for the board, because it'll replace it with the actual < character when you try to edit or quote the post.
Elric
Posts: 211/687 |
Silly me. I always thought that the code was put into either a <code> tag or a <pre> tag.
That's what I get for thinking.
Modereb
Posts: 18/75 |
It's done by using 'entities'. For example, showing <table> as normal text instead of a real table, is done by parsing <table>.
< is the entity for <. > is the entity for >.
Also, by using a serverside language, such as PHP, there are special functions to replace all HTML by entities. In PHP, for example, using htmlspecialchars() replaces 5 characters by their entities.
LizardKing's method is just a sloppy workaround, and it NOT the way it's supposed to be done, considering the effect can be unknown in another browser. |
LizardKing
Posts: 135/596 |
By typing a <z> inside the html tag, like so: <<z>table>. That will give you <table>.
DarkSlaya
Posts: 217/4249 |
How do you show HTML code on a website without it being processed by the brower. I'Ve seen this on websites for webmasters and I'M still wondering how to do so. |
| | |
|