what is the difference between attribute <required> and <autofocus> | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the difference between attribute <required> and <autofocus>

31st Aug 2020, 2:39 AM
Athraa Faraj Sagban
1 Answer
+ 6
Required attribute requires the user to fill the field before letting him submit the form. Autofocus attribute if set to true automatically focuses on the field you put the attribute in, so that u can start typing without first clicking on that input field,
31st Aug 2020, 2:58 AM
maf
maf - avatar