David Imeh
last year
Davidcountry asked

Why does the input in this case having an ending tag (/>) ??

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

So when you see something like <input />, that little / just means the tag is self-closing — it doesn’t need an end tag like </input>.

But guess what? Starting with HTML5, you don’t even need the / anymore. You can just write:

<input><br> <br><br> <img src="photo.jpg">

And it works the same! Super simple. 👍

HTML
This question was asked as part of the Learn HTML course.