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... | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 217/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 06-12-04 02:24 AM Link | Quote
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.
LizardKing
..of The Carnival Creation

Armet
87/94
Level: 38

Posts: 135/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Norway

Since last post: 4 days
Last activity: 13 hours
Posted on 06-12-04 02:31 AM Link | Quote
By typing a <z> inside the html tag, like so: <<z>table>. That will give you <table>.
Modereb

Paragoomba
Level: 15

Posts: 18/75
EXP: 14749
For next: 1635

Since: 06-04-04

Since last post: 350 days
Last activity: 339 days
Posted on 06-12-04 04:31 AM Link | Quote
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.
Elric

Chasupa


Currently Playing:
You Like A Lute.
Level: 40

Posts: 211/687
EXP: 440016
For next: 1293

Since: 03-15-04
From: Melniboné

Since last post: 6 hours
Last activity: 6 hours
Posted on 06-12-04 08:01 AM Link | Quote
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.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 956/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 06-13-04 01:11 PM Link | Quote
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.


(edited by HyperHacker on 06-13-04 04:12 AM)
(edited by HyperHacker on 06-13-04 04:13 AM)
(edited by HyperHacker on 06-13-04 04:14 AM)
(edited by HyperHacker on 06-13-04 04:15 AM)
FreeDOS

Lava Lotus
Wannabe-Mod :<
Level: 59

Posts: 523/1657
EXP: 1648646
For next: 24482

Since: 03-15-04
From: Seattle

Since last post: 6 hours
Last activity: 4 hours
Posted on 06-15-04 02:06 AM Link | Quote
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!


(edited by FreeDOS on 06-14-04 05:07 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
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.017 seconds.