Show double quotes inside HTML's key="value" string

I’m working on a project, it is very big, so here is an MCVE: https://mcve.glitch.me/

I want to show double quotes around browse word, as

Click the “browse” button

But, when I write placeholder="Click the \"browse\" button", it shows,

image

I know, I can simply write, placeholder='Click the "browse" button', as seen in MCVE, but then it throws an error:

The value of attribute [ placeholder ] must be in double quotes

How to move on?


btw, MCVE stands for minimal, complete, verifiable example.

placeholder="Click the "browse" button"
2 Likes

Thanks, I like your solution :slight_smile:

But, I can’t figure out why the normal one could not render properly. Is it a bug?

The HTML5 standard does not require quotes around attribute values.
W3C recommends quotes in HTML4, and demands quotes for stricter document types like XHTML.
Sometimes it is necessary to use quotes.

2 Likes