12
<svg height="210" width="400">
  <path d="M150 0 L75 200 L225 200 Z" />
</svg>

Does d stand for something in particular? I couldn't find anything via Google.

2 Answers 2

19

d is Path Data. The definition of the outline of a shape.

Reference : http://www.w3.org/TR/SVG/paths.html#PathData

1
  • 2
    Been using SVGs for years, and just came here to find out what it stood for, because I was curious. I guess data is it, though I've also seen people call it description and definition. Nov 5, 2019 at 18:27
4
  • d refers to the <path> data. (mdn link)
  • M tells the canvas to put the pen down at a specific location. It doesn't draw to that point from wherever it was previously.
  • L tells the canvas to draw a line from wherever it was last to the given coordinate.
  • Z tells the canvas to stop drawing (pick the pen up).

I found this overview from Dashing d3js on SVGs helpful.

2
  • d3 blog link is broken. Do you know the latest link if possible? Mar 5, 2021 at 20:28
  • 1
    @theprogrammer fixed
    – royhowie
    Mar 17, 2021 at 1:13

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.