Jump to content
smus

HTML Symbols: displaying a text as it is

Recommended Posts

How to display a text as it is in HTML using only HTML tags? For example, I want special symbols like & not to be interpreted by browser as &, but display as &

All I found is a deprecated <xmp> tag, it works, but it creates a new paragraph for every symbol.

Share this post


Link to post
Share on other sites

You just need to encode the "&", like this: &amp;amp;

  • Thanks 1

Share this post


Link to post
Share on other sites
7 minutes ago, Ingolme said:

You just need to encode the "&", like this: &amp;amp;

That's right, thanks! Didn't think about it. All ingenious solutions are so simple :)

Share this post


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...