News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

Nooblar HTML question

Started by Ceathreamhnan, November 23, 2006, 21:43:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ceathreamhnan

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...

Clock'd 0Ne

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 ]

Ceathreamhnan

I tried removing the < and > but that didnt work; the rest looks hugely complex! Will have a go though. :up:

Ceathreamhnan

Didnt work - If I replace [stuff] with the example html code, it just disappears. Do I need the square brackets ?

madmax

should have worked, hmmm

check this link 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)

Clock'd 0Ne

Looks very familiar that does  :mrgreen:  :lol:

Ceathreamhnan

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

M3ta7h3ad

just use %lt; and %gt; to replace > and < respectively.

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

so.. %gt;body%lt; =

White Giant

Or if you want to make it really simple, just make the code an image.  :mrgreen:

M3ta7h3ad

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.