Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1035112 of y

  • Revision slug: Web/SVG/Attribute/y
  • Revision title: y
  • Revision id: 1035112
  • Created:
  • Creator: Tigt
  • Is current revision? No
  • Comment

Revision Content

« SVG Attribute reference home

The y attribute indicates a y-axis coordinate in the current SVG coordinate system. The exact effect of this coordinate depends on the element. Most of the time, it represent the y-axis coordinate of the upper-left corner of the bounding box of the reference element, positioning the element vertically.

If the attribute is not specified, the default value is 0, except for the {{ SVGElement("filter") }} and {{ SVGElement("mask") }} elements where the default is -10%.

Usage

Categories None
Value <coordinate>
Animatable Yes
Normative document SVG 1.1 (2nd Edition): altGlyph element
SVG 1.1 (2nd Edition): cursor element
SVG 1.1 (2nd Edition): fePointLight element
SVG 1.1 (2nd Edition): feSpotLight element
SVG 1.1 (2nd Edition): filter element
SVG 1.1 (2nd Edition): foreignObject element
SVG 1.1 (2nd Edition): glyphRef element
SVG 1.1 (2nd Edition): image element
SVG 1.1 (2nd Edition): pattern element
SVG 1.1 (2nd Edition): rect element
SVG 1.1 (2nd Edition): svg element
SVG 1.1 (2nd Edition): text element
SVG 1.1 (2nd Edition): use element
SVG 1.1 (2nd Edition): Filter primitive
SVG 1.1 (2nd Edition): mask element
SVG 1.1 (2nd Edition): tspan element

{{ page("/en/SVG/Content_type","coordinate") }}

Elements

The following elements can use the y attribute

  • Filter primitive elements »
  • {{ SVGElement("altGlyph") }}
  • {{ SVGElement("fePointLight") }}
  • {{ SVGElement("feSpotLight") }}
  • {{ SVGElement("filter") }}
  • {{ SVGElement("foreignObject") }}
  • {{ SVGElement("glyphRef") }}
  • {{ SVGElement("image") }}
  • {{ SVGElement("pattern") }}
  • {{ SVGElement("rect") }}
  • {{ SVGElement("svg") }}
  • {{ SVGElement("text") }}
  • {{ SVGElement("use") }}
  • {{ SVGElement("mask") }}
  • {{ SVGElement("tref") }}
  • {{ SVGElement("tspan") }}

Revision Source

<p>« <a href="/en/SVG/Attribute">SVG Attribute reference home</a></p>

<p><span class="seoSummary">The <strong><code>y</code></strong> attribute indicates a y-axis coordinate in the current SVG coordinate system. The exact effect of this coordinate depends on the element.</span> Most of the time, it represent the y-axis coordinate of the upper-left corner of the bounding box of the reference element, positioning the element vertically.</p>

<p>If the attribute is not specified, the default value is <strong>0</strong>, except for the {{ SVGElement("filter") }} and {{ SVGElement("mask") }} elements where the default is <strong>-10%</strong>.</p>

<h2 id="Usage">Usage</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="row">Categories</th>
   <td>None</td>
  </tr>
  <tr>
   <th scope="row">Value</th>
   <td><a href="/en/SVG/Content_type#Coordinate">&lt;coordinate&gt;</a></td>
  </tr>
  <tr>
   <th scope="row">Animatable</th>
   <td>Yes</td>
  </tr>
  <tr>
   <th scope="row">Normative document</th>
   <td><a class="external" href="https://www.w3.org/TR/SVG/text.html#AltGlyphElementYAttribute">SVG 1.1 (2nd Edition): altGlyph element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/interact.html#CursorElementYAttribute">SVG 1.1 (2nd Edition): cursor element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/filters.html#fePointLightYAttribute">SVG 1.1 (2nd Edition): fePointLight element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/filters.html#feSpotLightYAttribute">SVG 1.1 (2nd Edition): feSpotLight element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/filters.html#FilterElementYAttribute">SVG 1.1 (2nd Edition): filter element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/extend.html#ForeignObjectElementYAttribute">SVG 1.1 (2nd Edition): foreignObject element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/text.html#GlyphRefElementYAttribute">SVG 1.1 (2nd Edition): glyphRef element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/struct.html#ImageElementYAttribute">SVG 1.1 (2nd Edition): image element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/pservers.html#PatternElementYAttribute">SVG 1.1 (2nd Edition): pattern element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/shapes.html#RectElementYAttribute">SVG 1.1 (2nd Edition): rect element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/struct.html#SVGElementYAttribute">SVG 1.1 (2nd Edition): svg element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/text.html#TextElementYAttribute">SVG 1.1 (2nd Edition): text element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/struct.html#UseElementYAttribute">SVG 1.1 (2nd Edition): use element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/filters.html#FilterPrimitiveYAttribute">SVG 1.1 (2nd Edition): Filter primitive</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/masking.html#MaskElementYAttribute">SVG 1.1 (2nd Edition): mask element</a><br />
    <a class="external" href="https://www.w3.org/TR/SVG/text.html#TSpanElementYAttribute">SVG 1.1 (2nd Edition): tspan element</a></td>
  </tr>
 </tbody>
</table>

<p>{{ page("/en/SVG/Content_type","coordinate") }}</p>

<h2 id="Elements">Elements</h2>

<p>The following elements can use the <code>y</code> attribute</p>

<ul>
 <li><a href="/en/SVG/Element#FilterPrimitive">Filter primitive elements</a> »</li>
 <li>{{ SVGElement("altGlyph") }}</li>
 <li>{{ SVGElement("fePointLight") }}</li>
 <li>{{ SVGElement("feSpotLight") }}</li>
 <li>{{ SVGElement("filter") }}</li>
 <li>{{ SVGElement("foreignObject") }}</li>
 <li>{{ SVGElement("glyphRef") }}</li>
 <li>{{ SVGElement("image") }}</li>
 <li>{{ SVGElement("pattern") }}</li>
 <li>{{ SVGElement("rect") }}</li>
 <li>{{ SVGElement("svg") }}</li>
 <li>{{ SVGElement("text") }}</li>
 <li>{{ SVGElement("use") }}</li>
 <li>{{ SVGElement("mask") }}</li>
 <li>{{ SVGElement("tref") }}</li>
 <li>{{ SVGElement("tspan") }}</li>
</ul>
Revert to this revision