Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add HTML line break within an input text placeholder [duplicate]

I want to add a line break within my input text placeholder.

<div class="form-group">
    <input type="text" class="form-control ph" id="" placeholder="Qualification Education Background *">
</div>

I tried with

<div class="form-group">
    <input type="text" class="form-control ph" id="" placeholder="Qualification\n</br> Education\n <br>Background *">
</div>

But it doesn't work. Would anyone help me to achieve this?

like image 670
John Avatar asked Sep 18 '25 11:09

John


1 Answers

input can't reach more than one line, so if you wanna make the input multyline use textarea. for make a line break in the placeholder of textarea use html entity-

&#10;

for example:

<div class="form-group">
     <textarea class="form-control ph" rows="5" 
     placeholder="Qualification &#10;Education &#10;Background *"></textarea>
</div>
like image 153
Yosef Tukachinsky Avatar answered Sep 20 '25 03:09

Yosef Tukachinsky