crmamx Posted April 13, 2011 Share Posted April 13, 2011 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. Quote Link to comment Share on other sites More sharing options...
nogray Posted April 13, 2011 Share Posted April 13, 2011 Use a pre tag and replace all the < with < and > with > If you have dreamweaver, copy the code you want to display, go to design mode, click on where you want it and paste it. Dreamweaver will take care of the rest. Quote Link to comment Share on other sites More sharing options...
Maq Posted April 13, 2011 Share Posted April 13, 2011 Enclose the HTML in tags. You could also put the code in a textarea, I think that would work as well. Quote Link to comment Share on other sites More sharing options...
crmamx Posted April 13, 2011 Author Share Posted April 13, 2011 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.... Quote Link to comment Share on other sites More sharing options...
Maq Posted April 13, 2011 Share Posted April 13, 2011 Enclose the HTML in 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 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.... Haha yeah, I was thinking that. You should include it in your tutorial Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.