How to insert single quotes inside simple html quotes

Asked

Viewed 324 times

1

I need the placeholder for my input tag to be "Patient’s Name" and thanks to the script being used, I can’t double quote. I would like to know how I can insert a single quote within two single quotes.

Follows the code:

<input type='text' class='form-control' name='patientsName' id='patientsName' placeholder='Patients Name'>

How I wish it was:

<input type='text' class='form-control' name='patientsName' id='patientsName' placeholder='Patient's Name'>

If anyone could help out over there

  • script from which language you use ? Try something like placeholder='Patient\'s Name'

  • Stack overflow people Brazil has to stop negativing question when do not know answer.

1 answer

4


Use the escape character &#39; referring to single quotation marks ':

<input type='text' class='form-control' name='patientsName' id='patientsName' placeholder='Patient&#39;s Name'>

  • 1

    Thanks man, it worked!!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.