SVG Line with Arrow

by rgendron

HTML

<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" viewBox="0 40 400 200">
    <marker id="triangle"
      viewBox="0 0 10 10" refX="0" refY="5" 
      markerUnits="strokeWidth"
      markerWidth="4" markerHeight="3"
      orient="auto">
      <path d="M 0 0 L 10 5 L 0 10 z" />
    </marker>
	<line x1="100" y1="50.5" x2="300" y2="50.5" marker-end="url(#triangle)" stroke="black" stroke-width="10"/>
	<polyline points="100 100 300 100" marker-end="url(#triangle)" stroke="black" stroke-width="10"/>
	<path d="M100 150.5l200 0" marker-end="url(#triangle)" stroke="black" stroke-width="10"/>
</svg>