You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dt><ahref="http://dev.w3.org/html5/spec/single-page.html#element-dfn-contexts" title="element-dfn-contexts">Contexts in which this element can be used</a>:</dt>
91
91
<dd>Where <ahref="http://dev.w3.org/html5/spec/single-page.html#embedded-content-2">embedded content</a> is expected.</dd>
<p>The <code><dfn>picture</dfn></code> element used for displaying an image that can come from a range of sources. Which image the user agent displays depends on [forthcoming algorithm]. </p>
108
108
<p>For user agents that don't support the <code>picture</code> element, an author can provide an <code>img</code> element as <a>fallback content</a>. User agents SHOULD NOT show this content to the user: it is intended for legacy user agents that do not support <code>picture</code>, so that a legacy <code>img</code> element can be shown instead.</p>
109
-
<p>Authoring requirement: The picture element must not be used as a layout tool. In particular, picture elements should not be used to display transparent images, as they rarely convey meaning and rarely add anything useful to the document. </p>
109
+
<p>Authoring requirement: as with the <code>img</code> element, the <code>picture</code> element must not be used as a layout tool. In particular, picture elements should not be used to display transparent images, as they rarely convey meaning and rarely add anything useful to the document. </p>
<p>Unlike the <code>picture</code> element, the <code>img</code> element is limited to a single image resoure, but cases where an author need to define different image sources depending on the factors such as the design, size resolution, and display density. The most suitable image source may be an image sized appropriately for the display size or pixel density. Or the most suitable image source may be a different version of an image that has been modified by the author to be suitable for a particular use (see: <a>art direction</a> use case). </p>
119
-
<p>It is also not possible to assign a source directly to a picture element. For that case, use an <code>img</code> element. </p>
121
+
<h3>Differences from <code>img</code> element</h3>
122
+
<p>Unlike the <code>img</code> element, which is limited to pointing to a single image resource, the <code>picture</code> element is intended to allow an author to reference many different image sources that the browser can then choose based on a <a>media query</a> or some other relevant condition. This means that a user agent can best select an image source that is most suitable for available display size, pixel density, or possibly even network bandwidth. Or the most suitable image source may be a different version of an image that has been modified by the author to be suitable for a particular use (see: <a>art direction</a> use case). </p>
123
+
<p>It is also not possible to assign a source directly to a picture element. For that case, an author needs to use an <code>img</code> element instead. </p>
120
124
</section><!-- / picture permitted attributes -->
121
125
122
126
<section>
123
127
124
128
<p>When used with the <code>picture</code> element, a <a>document</a> SHOULD only contain <code>source</code> elements need to represent the same subject matter, while cropping and zooming can differ.</p>
125
-
<divclass="issue">It should be codified that this is not a mechanism by which to swap disparate images depending on screen size. See: <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=18384#c7">https://www.w3.org/Bugs/Public/show_bug.cgi?id=18384#c7</a></div>
129
+
<divclass="issue">It should be codified that this is not a mechanism by which to swap disparate images depending on screen size. See bug <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=18384#c7">18384</a>.</div>
126
130
</section><!-- /source-element -->
127
131
128
132
<sectionid="source-permitted-attr">
129
133
<h1>The <code>srcset</code> attribute </h1>
130
-
<p>The <dfn><code>srcset</code> attribute</dfn> of the <code>source</code> element is a comma-separated list of <a>valid non-empty URL potentially surrounded by spaces</a> referring to alternate <a>media resource</a>s for a single image at different resolutions.</p>
131
-
<p>The value of the srcset attribute use the <a><dfn>image-set notation</dfn></a> micosyntax. </p>
132
-
</section>
134
+
<p>The <dfn><code>srcset</code> attribute</dfn> of the <code>source</code> element is is used to refer to alternate <a>media resource</a>s for a single image at different resolutions. The expected value of the attribute is a comma-separated list of <a>valid non-empty URL potentially surrounded by spaces</a> that makes use of the <a><dfn>image-set notation</dfn></a> micosyntax. </p>
0 commit comments