Why doesn't <img> need a closing tag like <div>?
Because <img> is a self-closing tag that cannot have child elements or content, the browser treats it as complete without a closing tag.
💡 Self-closing tags stand alone and show content immediately without wrapping anything.
Can I write <img></img> with a closing tag?
While browsers tolerate it, <img> is meant to be self-closing. Adding a closing tag can confuse the browser and is not standard HTML.
💡 Use self-closing tags without closing tags for cleaner, correct HTML.
Why does <br> create a line break but has no visible box?
<br> inserts a line break in text flow but does not create a visible box or content itself.
💡 Self-closing tags like <br> affect layout without showing a box.