r/HTML • u/No-Tea5041 • Sep 19 '26
What am I doing wrong?
No matter what numbers I enter, I always get it wrong. I even used smaller numbers for height and larger for width incase they got it mixed up. Their AI is telling me to do everything I am already doing
4
Upvotes
View all comments
Show parent comment
2
u/UniqueUsername014 Sep 19 '26
From Void element on MDN:
The
/>syntax is technically valid, but it means the same thing as just>. The element<div />is an open div, not the same as<div></div>.For a longer writeup regarding using the self-closing tags for formatting purposes, see The case against self-closing tags in HTML