how to add text on top of an input field? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

how to add text on top of an input field?

how to add text on top of an input field?

4th Jan 2021, 4:56 PM
Arman Tepnanc
Arman Tepnanc - avatar
3 Answers
+ 4
<form> <label>Name:</label> <input type="text"> </form> Or you can use placeholder <form> <input type="text" placeholder="Name:"> </form>
19th Jan 2021, 4:13 PM
Սոֆի Մովսեսյան
Սոֆի Մովսեսյան - avatar
+ 4
You can use label element just before the input element like so : <label>Email</label> <input />
4th Jan 2021, 5:01 PM
Med Amine Fh
Med Amine Fh - avatar
+ 1
Type label: <label>UserName</label> <input type="">
5th Jan 2021, 12:33 AM
Ăhmęđ Mãhmøűđ
Ăhmęđ Mãhmøűđ - avatar