Jump to content

Recommended Posts

In my html program I want the browser to display the following code exactly as written.

 

Following is the html code your would use

<html>
          <title>My Web Page</title>
<head>
</head>
<body>
<p> Hello World</p>
</body>
</html>

 

How do I do it? I don't have an "insert code" element as does phpF.

Link to comment
https://forums.phpfreaks.com/topic/233634-i-dont-have-an-insert-code/
Share on other sites

Enclose the HTML in <xmp> tags.  You could also put the code in a textarea, I think that would work as well.

 

I like the simplest way which seems to be the <xmp> tag. Funny I've never seen it explained in any of the many tutorials I've read.

 

You probably guessed it Maq. I need it for my tutorial.... :D

Enclose the HTML in

tags.  You could also put the code in a textarea, I think that would work as well.<p> </p>

 

I like the simplest way which seems to be the

tag. Funny I've never seen it explained in any of the many tutorials I've read.<p> </p> <p> You probably guessed it Maq. I need it for my tutorial.... <img src="https://forums.phpfreaks.com/uploads/emoticons/default_happy-02.gif" alt=":D"></p> <p> </p>

Haha yeah, I was thinking that.  You should include it in your tutorial ;)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.