Nima Omrani
Nima Omrani

Reputation: 335

How to use HTML entity codes instead of character in HTML

I'm writing a post about quote characters like curly quotes. I want to be able to print this string “ to demonstrate html entity of this character but when I open the html page it turns to the character itself.

I think this has to do with the default charset of html5 documents set to UTF-8 but I've seen pages like this one using the raw code.

Is there any way to do this in html?

Upvotes: 0

Views: 168

Answers (1)

Justinas
Justinas

Reputation: 43479

When you output “ it's converted to HTML entity ". So to output it as-is you must double encode it: “

Upvotes: 4

Related Questions