What is "value" in "<input>" tag? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

What is "value" in "<input>" tag?

i dont know why do we need "value" tag. even uf we delete it nothing will change.

8th Apr 2019, 8:41 PM
Mahdi Dehghani
Mahdi Dehghani - avatar
1 Resposta
+ 8
The value attribute allows you to set a default value for your input tag. Itā€™s not necessary to have the value attribute, itā€™s only when you need it. Itā€™s also the attribute referenced by JavaScript to change the value of input tags. Hope it helped.
8th Apr 2019, 8:51 PM
Victor Andersson
Victor Andersson - avatar