I need to write a longer hint in Placeholder html5. But It's only allows My to write 15 16 character. I tried input type="text" placeholder="and here i need to write something a little bit longer but it just doesn't allow me" I searched in Google but wasn't helpful.
Asked
Active
Viewed 113 times
-1
-
Can you share an html example where you have this issue ? – Telman Aug 03 '22 at 23:25
-
Please provide enough code so others can better understand or reproduce the problem. – Community Aug 04 '22 at 05:27
-
– Mo NA Aug 04 '22 at 16:15
1 Answers
1
You can take a look to this code:
// HTML
<input placeholder="Please enter your name, address and shoe size">
// Javascript
input.setAttribute('size',input.getAttribute('placeholder').length);
I got the answer from this link How to set an input width to match the placeholder text width, if you want the details you can check the link, thank you

Rodericus Ifo Krista
- 84
- 3