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
1
u/testingaurora Sep 20 '26
Its not browser specific, its a lamgiage requirement. Yes the tag will display the image without it, html is forgiving but its still required in the spec. Same way you don't close an <img></img> tag but it will still work.
Just get in the habit of adding
alt="", and then work on learning how to write alt text, and when its necessary , when its not (in which case a background-image may be a better choice)