Displaying HTML code inside an HTML document

Contributor Icon Contributed by AlexTheBeast Date Icon October 3, 2003  
Tag Icon Tagged: HTML

Displaying HTML code within an HTML document can be confusing. The XML tag makes it easy.


The XML tag tells the browser not to render any further tags until it sees the /XML tag.

For example…

Tech-Recipes

will display…
Tech-Recipes

Enjoy!

Previous recipe | Next recipe |
 
  • marce
    This didn't work...

    I'm trying to get this to work with html, but the code remained invisible.

    mpamphile @ hotmail.com
  • Rex
    One way to do this is to use the < plaintext > tag:

    <plaintext>Here is a link: tech-recipes</plaintext>

    This should display as:

    Here is a link:
    tech-recipes
  • tech9
    Everything after the <plaintext> tag is plain text including my </plaintext> tag and everything after that. Is there any other way to do this easily?

    Dave
  • wav syntax
    just include the blank tag with the slash in it "</>" before the inner contents of the actual displayed tag.

    <</>a href="http://tech-recipes.com">tech-recipes<</>/a>

    this is a link.



    this is the only working example that ive come accross once and for all,
    this is the best way to do it.
  • None
    Don't you mean to use the <XMP> tag?

    It's depreciated but it's the only way I know of displaying HTML in a page. The standards people want you to use <PRE> tags but they don't stop browsers interpreting the block.

    See here for more details: http://www.w3schools.com/tags/tag_pre.asp

    Cheers

    None
  • varinder
    from where i can download the HTML ebook from internet.....
    plz snd me link
blog comments powered by Disqus