Quotation marks in textarea placeholder
Asked Answered
S

1

8

This should be pretty straight forward.... I would like the placeholder text in a textarea to display quotation marks. As in "HELLO".

I tried the usually-reliable "\"Hello\"" but that doesn't work.... it outputs simply \ because it sees that contained between opening and closing quotes.

Skutchan answered 2/12, 2018 at 17:42 Comment(1)
Possible duplicate of How to properly escape quotes inside html attributes?Ophthalmologist
L
9

You can use " for the quotation mark symbol. For example:

<textarea name="content" placeholder="&quot;Hello&quot;"></textarea>
Lunulate answered 2/12, 2018 at 17:47 Comment(2)
I guess that that is the easiest.... but out of curiosity, is there no backslash method to force characters?Skutchan
@PaulClift — \ has no special meaning in HTML.Ophthalmologist

© 2022 - 2024 — McMap. All rights reserved.