Jump to content

Put HTML or PHP coding, but don't execute it. Just show the coding itself.


Recommended Posts

Hello,I'm not exactly sure how to explain my question, however, I'll try my best:How do you display coding without making it execute? Just, show what it looks like? Such as using the CODE tag in forums.

<html><b>D:</b></html>

Which makes it so it doesn't execute, it just displays the code.Think of the examples in the tutorials on W3Schools.Thanks.

Link to post
Share on other sites

Surround your code with <code> </code>, it will escape the HTML characters and display the code in monotype font

Link to post
Share on other sites

Weird - I thought is escaped HTML entities - I suppose you will have to replace the < and > with < and > ... :)

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...