HTML Standard Tracker


File a bug

SVNBugCommentTime (UTC)
2943[Authors] [Conformance Checkers] Allow the dimension attributes to be set to zero. (credit: sp) (bug 6544)2009-04-01 00:12
@@ -19021,20 +19021,24 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
   <h6>An image not intended for the user</h6>
   <p>Generally authors should avoid using <code>img</code> elements
   for purposes other than showing images.</p>
   <p>If an <code>img</code> element is being used for purposes other
   than showing an image, e.g. as part of a service to count page
   views, then the <code title="attr-img-alt">alt</code> attribute must
   be the empty string.</p>
+  <p>In such cases, the <code title="attr-dim-width">width</code> and
+  <code title="attr-dim-height">height</code> attributes should both
+  be set to zero.</p>
   <h6>An image in an e-mail or document intended for a specific person who is known to be able to view images</h6>
   <p>When an image is included in a communication (such as an HTML
   e-mail) aimed at someone who is known to be able to view images,
   the <code title="attr-img-alt">alt</code> attribute may be
   omitted. However, even in such cases it is strongly recommended
   that alternative text be included (as appropriate according to the
   kind of image involved, as described in the above entries), so
@@ -27869,53 +27873,59 @@ function AddCloud(data, x, y) { ... }</pre>
   title="attr-dim-height"><code>height</code></dfn> attributes on
   <code>img</code>, <code>iframe</code>, <code>embed</code>,
   <code>object</code>, <code>video</code>, and, when their <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-image">Image Button</span> state,
   <code>input</code> elements may be specified to give the dimensions
   of the visual content of the element (the width and height
   respectively, relative to the nominal direction of the output
   medium), in CSS pixels. The attributes, if specified, must have
   values that are <span title="valid non-negative integer">valid
-  non-negative integers</span> greater than zero.</p>
+  non-negative integers</span>.</p>
   <p>The specified dimensions given may differ from the dimensions
   specified in the resource itself, since the resource may have a
   resolution that differs from the CSS pixel resolution. (On screens,
   CSS pixels have a resolution of 96ppi, but in general the CSS pixel
   resolution depends on the reading distance.) If both attributes are
   specified, then one of the following statements must be true:</p>
    <li><span title=""><var title="">specified width</var> - 0.5 &le;
              <var title="">specified height</var> * <var title="">target ratio</var> &le;
              <var title="">specified width</var> + 0.5</span></li>
    <li><span title=""><var title="">specified height</var> - 0.5 &le;
              <var title="">specified width</var> / <var title="">target ratio</var> &le;
              <var title="">specified height</var> + 0.5</span></li>
+   <li><span title=""><var title="">specified height</var> = <var title="">specified width</var> = 0</span></li>
   <p>The <var title="">target ratio</var> is the ratio of the
   intrinsic width to the intrinsic height in the resource. The <var
   title="">specified width</var> and <var title="">specified
   height</var> are the values of the <code
   title="attr-dim-width">width</code> and <code
   title="attr-dim-height">height</code> attributes respectively.</p>
   <p>The two attributes must be omitted if the resource in question
   does not have both an intrinsic width and an intrinsic height.</p>
-  <p class="note">Basically, the dimension attributes can't be used to
-  stretch the image.</p>
+  <p>If the two attributes are both zero, it indicates that the
+  element is not intended for the user (e.g. it might be a part of a
+  service to count page views).</p>
+  <p class="note">The dimension attributes are not intended to be used
+  to stretch the image.</p>
   <div class="impl">
   <p><strong>User agent requirements:</strong> User agents are
   expected to use these attributes <a href="#dimRendering">as hints
   for the rendering</a>.</p>
   <p>The <dfn title="dom-dim-width"><code>width</code></dfn> and <dfn
   title="dom-dim-height"><code>height</code></dfn> DOM attributes on
   the <code>iframe</code>, <code>embed</code>, <code>object</code>,