W3cubDocs

/SVG

y1

For the <line> element, this attribute define the y-axis coordinate of the start of the line. If the attribute is not specified, the effect is as if a value of 0 were specified.

For the <linearGradient> element, this attribute define the y-axis coordinate of the start of the vector gradient onto which the <stop> elements are mapped. If the attribute is not specified, the effect is as if a value of 0% were specified.

Usage context

<coordinate>

A <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for <length>.

Within the SVG DOM, a <coordinate> is represented as an SVGLength or an SVGAnimatedLength.

Example

The y1 attribute on the <line> element

Source code Output result

Unable to find file y1.svg

Unable to find file y1.svg

» y1.svg

The y1 attribute on the <linearGradient> element

Source code Output result

Unable to find file linearGradient.svg

Unable to find file linearGradient.svg

» linearGradient.svg

Elements

The following elements can use the y1 attribute

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/y1