<img> versus <img /> | Sololearn: Learn to code for FREE!

0

<img> versus <img />

Hi! I learned some HTML years ago and I am used to the tag <img> for images; however, this module references the tag as <img />. Is there a reason for this? I also noticed it with <br /> or as I knew it <br>. I am not trying to be obtuse, but I am curious if something has changed recently with HTML or if Sololearn does this to signify that these type of tags do not need separate open and close tags.

7/18/2020 9:00:14 PM

ALHazeltine

1 Answer

New Answer

+3

Both tags are valid. https://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br