www.webdeveloper.com
Results 1 to 5 of 5

Thread: How to write code without it take effect

  1. #1
    Join Date
    May 2006
    Posts
    2

    How to write code without it take effect

    I'd like to know how can you write a html code without it to take effect (the result would be that people can see it)
    Tanks

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Enclose it in comment tags or you set the style to visibility hidden or display none. Code is still in the source, but isn't presented.
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Feb 2006
    Posts
    2,927
    If crash means he wants to have the tags and 'raw' html visible:

    replace all the '<' characters with '&lt;';
    replace all the '&' characters with '&amp;';
    wrap the whole thing in a pre element in the body of a regular html page:
    Code:
    <pre style="white-space:pre">
    markup here
    </pre>
    Last edited by mrhoo; 05-25-2006 at 11:32 AM.

  4. #4
    Join Date
    May 2006
    Posts
    2
    Yup exactly what I needed, tks !
    But one thing, your trick only do < !
    I cant do > !

  5. #5
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Hehe, I guess it didn't occur to you what the 'lt' might have stood for then?
    Code:
    <code>&lt;title&gt;This is come codezor!&lt;/title&gt;</code>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles