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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×