Jump to content

How can I write HTML?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
How do I write HTML such as <b>test</b>????? Not just a bold test but showing the actual less than and greater than code.

#2
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
You have to escape them with HTML entities. For instance, less than is < and greater than is > So you'd write:
<b>test<b>

If you do a view source on this page, you should see that your actual comment is using the entities.

#3
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
wow, thanks! I didn't realize that it was so easy.

I never thought to view the source on this page either.

#4
Guest_cpvr_*

Guest_cpvr_*
  • Guests

brackett said:

You have to escape them with HTML entities. For instance, less than is < and greater than is > So you'd write:
<b>test<b>

If you do a view source on this page, you should see that your actual comment is using the entities.
Why's that? Can't you still use the regular html tags?

#5
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
Yeah, you can use regular HTML tags but I need to know how to actually write the < and > so they didn't show up as HTML.

#6
the-chad

the-chad

    Newbie

  • Members
  • PipPip
  • 23 posts
> for >
< for <

#7
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
Ahhh, I get it, gt = greater than, lt = less than. I've always wondered how one would do that, because it would just convert into whatever the HTML code was. Very interesting.