Defines a line by using beginning and ending (x,y) coordinate values with stroke and stroke-width styles .
Inherits from SVGElementSVGElement
PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from SVGElement PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from SVGTests PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from SVGLangSpace PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from SVGExternalResourcesRequired PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from SVGStylable PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Inherited from SVGTransformable PropertiesNo properties.
MethodsNo methods.
EventsNo events.
Examples<?xml version="1.0"?>
<svg width="120" height="120"
viewPort="0 0 120 120" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<line x1="20" y1="100"
x2="100" y2="20"
stroke="black"
stroke-width="2"/>
</svg>
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg">
<line x1="20" y1="100" x2="100" y2="100" stroke-width="2"
stroke="black" transform="rotate(-45 20 100)"/>
</svg>
Notes Remarks
Note: In addition to the attributes, properties, events, methods, and styles listed above, SVG elements also inherent core HTML attributes, properties, events, methods, and styles.
Standards informationThe SVGElement object has these properties:
Mozilla Developer Network : [SVGLineElement Article]
Microsoft Developer Network: [SVGLineElement Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4