Tekforums

Chat => Entertainment & Technology => Topic started by: Ceathreamhnan on November 23, 2006, 21:43:27 PM

Title: Nooblar HTML question
Post by: Ceathreamhnan on November 23, 2006, 21:43:27 PM
If I want to type some text which contains some HTML tags, in order to illustrate to someone else what to type to achieve the effect desired, how do I present this so the browser doesnt actually implement the code? Obviously here you have the Code button so I could

but how do I do it on an actual web page? is there a tag? I cant see one in html tag lists...
Title: Re:Nooblar HTML question
Post by: Clock'd 0Ne on November 23, 2006, 22:03:14 PM
Something like this will do it:


&.lt;html&.gt;
   &.lt;head&.gt;
   &.lt;/head&.gt;
   &.lt;body&.gt;
      [stuff]
   &.lt;/body&.gt;
&.lt;/html&.gt;


using &.lt; and &.gt; instead of < and > to surround markers will usually be good enough though.

[remove the . s ]
Title: Re:Nooblar HTML question
Post by: Ceathreamhnan on November 23, 2006, 22:14:15 PM
I tried removing the < and > but that didnt work; the rest looks hugely complex! Will have a go though. :up:
Title: Re:Nooblar HTML question
Post by: Ceathreamhnan on November 23, 2006, 22:21:12 PM
Didnt work - If I replace [stuff] with the example html code, it just disappears. Do I need the square brackets ?
Title: Re:Nooblar HTML question
Post by: madmax on November 23, 2006, 22:25:55 PM
should have worked, hmmm

check this link (http://www.htmldog.com/reference/htmltags/pre/) which looks like it has oddly familiar example on there  :lol:


for anything you dont want a browser to interpret, replace the "<" with "& lt" and ">" with "& gt" (no spaces)
Title: Re:Nooblar HTML question
Post by: Clock'd 0Ne on November 23, 2006, 22:57:00 PM
Looks very familiar that does  :mrgreen:  :lol:
Title: Re:Nooblar HTML question
Post by: Ceathreamhnan on November 23, 2006, 22:58:32 PM
Well I dont think theres anything wrong with the method; if I put

<img src="blah.jph">
(albeit with the < > replaced as mentioned.)
in a htm document and view it, I get what I want, but if the same bit of text is entered in a form in an online messaging page, it just comes up as two dots. So I presume that there is some overall constriction on certain html coding there; its not outlawed, cos you can use things like the actual example to display pictures, just not the example of the code to do so! ArrgH

And the Dog site is not bad but there could be more explanation of the context of each code for codechildren like me :D
Title: Re:Nooblar HTML question
Post by: M3ta7h3ad on November 24, 2006, 01:04:59 AM
just use %lt; and %gt; to replace > and < respectively.

Then you arent writing HTML but it appears correct. :)

so.. %gt;body%lt; =
Title: Re:Nooblar HTML question
Post by: White Giant on November 24, 2006, 01:10:58 AM
Or if you want to make it really simple, just make the code an image.  :mrgreen:
Title: Re:Nooblar HTML question
Post by: M3ta7h3ad on November 25, 2006, 09:54:06 AM
Quote from: White GiantOr if you want to make it really simple, just make the code an image.  :mrgreen:

lol but takes next to no effort to write the code in a wordpad document, then use find and replace to replace < and > with the corresponding < > stuffs.

Edit: ah doh.. it formatted the stuffs. but you know what I mean.