The input tag | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

The input tag

I understand that the input tag doesnā€™t have an end, but why is the ā€œ/ā€œ missing in this code for the input tag??

13th Apr 2020, 6:16 AM
Kamalluddeen Usman
Kamalluddeen Usman - avatar
3 Respostas
+ 7
That "/" at the end is completely optional, you can use it or not it doesn't make difference. It's better to have it as indication that this is self closing tag.
13th Apr 2020, 6:28 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 4
Rick is right, self-closing tags or unpaired tags doesn't necessarily be using the / (slash character). Except you used XHTML DTD, where it is necessary. If you used XHTML DTD you will get a warning when validating the page against XHTML convention. You can check your page at https://validator.w3.org/ to see how your page qualifies a certain standard šŸ‘
13th Apr 2020, 6:50 AM
Ipang
+ 2
Thanks Rick
13th Apr 2020, 6:42 AM
Kamalluddeen Usman
Kamalluddeen Usman - avatar