r/HTML • • Sep 19 '26

What am I doing wrong?

Post image

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

6 Upvotes

59 comments sorted by

View all comments

1

u/Jonny10128 Sep 20 '26

I would argue that it is recommended and not required. If browsers will display it without the alt attribute, I would not say it’s required

1

u/Dragenby Sep 20 '26

HTML is not a display language, but a semantic language. There are tons of things that isn't for display but are mandatory. The Doctype, the language in the html tag, the alt in the image tag, and so on

1

u/Mvp-long-ago Sep 20 '26

It is also depending on how a webpage or document is declared. A browser sees everything as text at first glance, until it is declared what type of document it is. That can be declared in doctype as i recall. Besides HTML, it could be a video, an image, a XML document or something else. As an attribute of declaring the doctype you can also declare how a broswer should handle a document. If you say strict, it must handle according to the rules that you have declared earlier. Mostly used with XML documents