Closed Thread Icon

Preserved Topic: How to show code Pages that link to <a href="https://ozoneasylum.com/backlink?for=15696" title="Pages that link to Preserved Topic: How to show code" rel="nofollow" >Preserved Topic: How to show code\

 
Author Thread
heddaLettis
Bipolar (III) Inmate

From: solitary confinement
Insane since: Aug 2000

posted posted 01-19-2001 19:07

I'm writing up some stuff, and need to show the actual HTML code on the page.

This will be in a nested table.

The <CODE> tag won't work, neither will the (and number60) HTML TAGS HERE(and number62) method.

Is it something with the nested table?

The formatting of the table itself is controlled in the style sheet.

Do I need to add a class selector?


Thanks!


[This message has been edited by heddaLettis (edited 01-19-2001).]

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:11

try it like this:

<SCRIPT LANGUAGE="javascript"><BR>
document.write("<FONT COLOR='RED'>This Is Red Text</FONT>")<BR>
</SCRIPT>

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:12

for the <> use ampersandLT; or ampersandGT;

[This message has been edited by Boudga (edited 01-19-2001).]

F1_error
Paranoid (IV) Mad Scientist

From: EN27
Insane since: Mar 2000

posted posted 01-19-2001 19:14

Use & l t ; (no spaces) which equals <

&amp;

Use & g t ; (no spaces) which equals >



heddaLettis
Bipolar (III) Inmate

From: solitary confinement
Insane since: Aug 2000

posted posted 01-19-2001 19:15

That javascript will just show "This is red text" in red, right?

That's not what I want to do. I want to show the actual <H1><TABLE><BR> tags themselves.

Normally I use the <CODE> tag, but no-go this time.

Gotta be something with the nested table. Or maybe a selector, but I've tried that.

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:15

yeah! What F1-Error said....

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:17

basically replace the <> with their HTML code names...

heddaLettis
Bipolar (III) Inmate

From: solitary confinement
Insane since: Aug 2000

posted posted 01-19-2001 19:17

You guys are too fast for me!

Thanks!

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:23

If you visit http://htmlgoodies.earthweb.com/primers/jsp/hgjsp_1.html you will see code displayed on that page and if you view the source you'll see how it was coded to be able to show the code instead of running the code.

heddaLettis
Bipolar (III) Inmate

From: solitary confinement
Insane since: Aug 2000

posted posted 01-19-2001 19:23

OK I tried F1's example, and did this:

<TR><TD>& l t ;<TABLE>& g t ; (no spaces)

and Whammo! my page was all messed up!

Shouldn't it just display the <TABLE> tag without it doing anything untoward to my page?

I don't get it.

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:26

don't use the literal <> if you're wanting to display the tags... use & l t ; table & g t ; (obviously no spaces)

F1_error
Paranoid (IV) Mad Scientist

From: EN27
Insane since: Mar 2000

posted posted 01-19-2001 19:27

leave out your < and > use & l t ; (with no spaces) and place a space between your opening and closing & g t ;

example: & l t ;TR& g t ; & l t ;TD& g t ; & l t ;TABLE& g t ; will look like <TR> <TD> <TABLE>



Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:28

oh yeah and no spaces... LOL

heddaLettis
Bipolar (III) Inmate

From: solitary confinement
Insane since: Aug 2000

posted posted 01-19-2001 19:29

Man am I stupid. I gotta stop smoking pot, or I gotta start smoking cigarettes again. Ever since I stopped I've got eraser head.

Know what I was doing wrong?

I was adding the brackets to the tags along with the ampersands!

Where's my smokes?

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 19:30

give this man a purple pill and quick!

F1_error
Paranoid (IV) Mad Scientist

From: EN27
Insane since: Mar 2000

posted posted 01-19-2001 19:30

Yeah, like Boudga said, No Spaces.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-19-2001 20:50

OK, This is bugging the heck out of me. Watch this!

&amp;lt;

No spaces! And it's not magic. Here's how it's done. Instead of using an actual &, use "&amp;amp;" So the above is actually typed as &amp;amp;lt; - and *that* was actually typed as &amp;amp;amp;lt; - and *that* was typed as &amp;amp;amp;amp;lt; ... you get the idea.

So just use the &amp;amp; thing instead of spaces, ok?

F1_error
Paranoid (IV) Mad Scientist

From: EN27
Insane since: Mar 2000

posted posted 01-19-2001 20:57

heheh, No Spaces, Down with spaces.

Why didn't I think of that? I mean, I know it. I just didn't think of it.

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 01-19-2001 21:01

dammit, I wanted to say that, I guess I need to cancel all social engagements so I can be more on top of my forum threads... *sigh*

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 21:31

wow I need more purple pills...

Sash
Paranoid (IV) Inmate

From: Canada, Toronto
Insane since: May 2000

posted posted 01-19-2001 21:58

<xmp>bla bla bla</xmp>

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 01-19-2001 22:15

<purple pill> <b>SWALLOW</b></purple pill>

« BackwardsOnwards »

Show Forum Drop Down Menu