Sizes referred to but not introduced nor explained nor shown in examples
MDN URL
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture
What specific section or headline is this issue about?
The srcset attribute
What information was incorrect, unhelpful, or incomplete?
After an example in the srcset section, references is made to sizes, but sadly sizes hasn't been introduced or explained.
What did you expect to see?
It would be helpful to explain what sizes is used for, since it isn't a common HTML 5 attribute and even more helpful if it was contained in an example.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/html/reference/elements/picture - MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/html/reference/elements/picture/index.md
- Last commit: https://github.com/mdn/content/commit/e9b6cd1b7fa8612257b72b2a85a96dd7d45c0200
- Document last modified: 2025-04-10T14:56:07.000Z
This section appears to have a link to srcset, but not to sizes.
@Andrew-Wiseman Would it have helped to have a link on sizes in the following sentence?
The
sizesattribute is not mandatory when usingsrcset, but it is recommended to use it in order to provide additional information to the browser to help it select the best image source.
Thanks for the response. A link would be good!
But my main point was that sizes is introduced in the text with a sentence to say it's not mandatory. But I might not know what sizes is for, since it's not an attribute I'm familiar with. So it would make more sense to first include an example with sizes in, then explain what it's for and then say it's not mandatory. Or at least to say that sizes can be used (and when and why) and then say it's not mandatory (and why).
And maybe it should be included in its own section title or share the section title with srcset ?
I have raised fixing [PR] (https://github.com/mdn/content/pull/40017) please review @caugner .