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 odpowiedzi
+ 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