Why are some tags self-closing whereas others are not?



Why are some tags self-closing (<img>, <br>, etc.) whereas others are not ?


The important distinction between self-closing tags and all other tags is that self-closing tags represent void elements. Void elements like <img> and <br> cannot contain any content. All other tags may (but are not required to) contain content.

FAQ: Learn HTML Elements - Common HTML Elements - Videos HTML