Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Seen this on a few websites...
  
User name:
Password:
Reply:
 

UserPost
FreeDOS
Posts: 523/1657
Originally posted by HyperHacker
-Use &lt; 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 &gt; as well.

And the edit/quote thing would be a problem if Acmlm make all &'s as &amp; 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 &lt; 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 &lt;table&gt;.

&lt; is the entity for <.
&gt; 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.
Acmlm's Board - I2 Archive - Programming - Seen this on a few websites...


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.011 seconds.