Skip to main content
Sorry, we couldn't find that HTML guide.

HTML Guide

The “sizes” attribute may be specified only if the “srcset” attribute is also present.

The sizes attribute is used to complement the srcset attribute on an <img> tag for responsive images, therefore it’s not valid if srcset is missing.

Learn more:

Related W3C validator issues