smus Posted August 27, 2018 Share Posted August 27, 2018 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. Link to comment Share on other sites More sharing options...
Ingolme Posted August 27, 2018 Share Posted August 27, 2018 You just need to encode the "&", like this: &amp; 1 Link to comment Share on other sites More sharing options...
smus Posted August 27, 2018 Author Share Posted August 27, 2018 7 minutes ago, Ingolme said: You just need to encode the "&", like this: &amp; That's right, thanks! Didn't think about it. All ingenious solutions are so simple Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now