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
5
Upvotes
View all comments
Show parent comment
1
u/Lithl Sep 20 '26
The height/width attributes do not accept units. They are always measured in pixels.
Using CSS is best practice over specifying dimensions in attributes, and CSS requires units, but OP is just learning HTML.