OiO.lk Blog HTML Fill the interior of an SVG path
HTML

Fill the interior of an SVG path


I am attempting to fill the interior of a path element in SVG using the following HTML code:

I have seen several related posts on SO but I have found them incomprehensible and of no help. What do I have to do to fill the interior of the path element with a color?

<h2>Start of arrow</h2>

  <svg width="450" height="400" xmlns="http://www.w3.org/2000/svg">
    <g id="arrow" stroke="red" stroke-width="3" stroke-linecap="round" fill="green">
      <path d="M100 298 Q 300 306 400 290"/>
      <path d="M100 315 Q 300 305 400 315"/>
      <path d="M100 298 Q 112 306 100 315"/>
    </g>
  </svg>



You need to sign in to view this answers

Exit mobile version