Jump to content


How to display "<head>" tags as text and not be HTML?


10 replies to this topic

#1 Swefx

    Young Padawan

  • Members
  • Pip
  • 14 posts

Posted 24 May 2006 - 11:17 PM

Hello,

I'am writing a tutorial and I need to be able to display the "<head>" and "<body>" tags as text and not HTML.

I used to know how to do this but I have forgotten.

Thanks for your time :P

#2 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 25 May 2006 - 12:25 AM

use
&gt;
for the > symobl (great than: gt)

and use
&lt;
for the < symbol (less than: lt)

:P

Edited by coolaid, 25 May 2006 - 12:26 AM.


#3 Swefx

    Young Padawan

  • Members
  • Pip
  • 14 posts

Posted 25 May 2006 - 12:28 AM

Thanks man!

#4 Jem

    Young Padawan

  • Members
  • Pip
  • 93 posts
  • Location:England
  • Interests:Photography, design &amp; developing, walking, cycling, reading.

Posted 25 May 2006 - 03:16 AM

If you want to write out large chunks of html and you don't want to change each < and > individually, you can use this: http://www.tutorialt...k/converter.php

#5 Mykos

    Young Padawan

  • Members
  • Pip
  • 75 posts
  • Location:Norway

Posted 27 May 2006 - 02:06 PM

You can also write in pre tags?

<pre>This is a tutorial with <head> and <body></pre>

Then you can also spesify another text color or size for the pre tags :)

It may also look cool in blockquote:

<blockquote><pre>This is a tutorial with <head> and <body></pre></blockquote>


#6 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 27 May 2006 - 02:58 PM

you can also change the visuals for <code> tags...

from what i've seen, <pre> is a pretty much useless tag.

#7 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 27 May 2006 - 03:02 PM

pre is useless lol.

Its mainly for formatting.

e.g you have a document with this in:

I love
		  monkeys
	 a lot

would show as
I love monkeys a lot
but within a pre code it would show
I love
		  monkeys
	 a lot

As you said, useless. :)

#8 Mykos

    Young Padawan

  • Members
  • Pip
  • 75 posts
  • Location:Norway

Posted 27 May 2006 - 03:07 PM

Hehe, sorry then, have seen others have used it ^^

How do you change the visuals for <code> then?

#9 Jem

    Young Padawan

  • Members
  • Pip
  • 93 posts
  • Location:England
  • Interests:Photography, design &amp; developing, walking, cycling, reading.

Posted 27 May 2006 - 03:08 PM

View PostMykos, on May 27 2006, 09:06 PM, said:

How do you change the visuals for <code> then?
Same way as you would any tag, with CSS..
I have a demo on my main site for someone who was complaining that about <code> not looking like <textarea>s - you can see how I proved it was possible here: http://www.jemjabella.co.uk/demo.php

#10 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 27 May 2006 - 03:09 PM

Through the magics of CSS :)

codebox {
		 // customize me
}

or...(not recomended)

<code style="//customize me"></code>

edit: Nice teamwork there Jem lol.

----
Jem.

you can make anything look like a textarea with css :)

Edited by .Matt, 27 May 2006 - 03:10 PM.


#11 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 27 May 2006 - 03:46 PM

oh, i was confused, <pre> is the good one. <code> is useless :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users