SVG path attribute Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The path attribute defines a text path or the motion path along with the characters of a text are displayed or a referenced element is animated respectively. The elements that are using this attribute includes: <animateMotion> and <textPath>.Syntax:path = path-dataAttribute Values: The path attribute accepts the values mentioned above and described belowpath-data: It has two different value i.e. it can either define a text path or the motion path along with the glyphs are to be rendered or animated respectively.Note: Its default value is considered as normal.Below examples illustrate the use of path attribute.Example 1: HTML <!DOCTYPE html> <html> <body> <h1 style="color: green; margin-left: 10px;"> GeeksforGeeks </h1> <svg viewBox="0 10 500 100" xmlns="https://www.w3.org/2000/svg"> <path fill="green" d = "M10, 90 Q90, 90 90, 45 Q90, 10 50, 10 Q10, 10 10, 40 Q10, 70 45, 70 Q70, 70 75, 50" /> <text> <textPath path = "M10, 90 Q90, 90 90, 45 Q90, 10 50, 10 Q10, 10 10, 40 Q10, 70 45, 70 Q70, 70 75, 50"> It is a Compute Science Portal </textPath> </text> </svg> </body> </html> Output:Example 2: HTML <!DOCTYPE html> <html> <body> <h1 style="color: green; margin-left: 80px;"> GeeksforGeeks </h1> <svg viewBox="0 15 700 200" xmlns="https://www.w3.org/2000/svg"> <path fill="none" stroke="green" d = "M 100, 100 m -75, 0 a 75, 75 0 1, 0 150, 0 a 75, 75 0 1, 0 -150, 0" /> <circle r="5" fill="green"> <animateMotion dur="5s" repeatCount="indefinite" path="M 100, 100 m -75, 0 a 75, 75 0 1, 0 150, 0 a 75, 75 0 1, 0 -150,0" /> </circle> </svg> </body> </html> Output: Create Quiz Comment T thacker_shahid Follow 0 Improve T thacker_shahid Follow 0 Improve Article Tags : Web Technologies HTML HTML-SVG SVG-Attribute Explore HTML BasicsHTML Introduction4 min readHTML Editors4 min readHTML Basics7 min readStructure & ElementsHTML Elements4 min readHTML Attributes7 min readHTML Headings3 min readHTML Paragraphs3 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists3 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks2 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables9 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms4 min readHTML5 Semantics5 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List5 min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like