files/en-us/web/svg/reference/element/line/index.md
The <line> SVG element is an SVG basic shape used to create a line connecting two points.
{{svginfo}}
0; Animatable: yes0; Animatable: yes0; Animatable: yes0; Animatable: yesThis element implements the {{domxref("SVGLineElement")}} interface.
html,
body,
svg {
height: 100%;
}
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<line x1="0" y1="80" x2="100" y2="20" stroke="black" />
<!-- If you do not specify the stroke
color the line will not be visible -->
</svg>
{{EmbedLiveSample('Example', 100, 100)}}
{{Specifications}}
{{Compat}}