SVG <hatch> Element Last Updated : 31 Mar, 2022 Comments Improve Suggest changes 2 Likes Like Report SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas. The <hatch> SVG element is used to stroke an object. It uses one or more pre-defined paths to fill an object. It repeats the path after a fixed interval in a specified direction to cover the areas to be painted. Syntax: <hatch x="" y="" pitch="" rotate="" hatchUnits="" hatchContentUnits="" transform="" href=""> Attributes: x - It defines the x-axis coordinate in the user coordinate system.y - It defines the y-axis coordinate in the user coordinate system.rotate - It specifies how the animated element rotates as it travels along a path specified in an <animateMotion> element.transform - It defines the list of transform definitions that are applied to an element and the element's children.href - It defines the link to a resource as a reference URL. Example 1: html <!DOCTYPE html> <html> <body> <svg viewBox="0 0 1100 400"> <defs> <hatch id="hatch" hatchUnits="userSpaceOnUse" pitch="5" rotate="135"> <hatchpath stroke="#a080ff" stroke-width="2" /> </hatch> </defs> <foreignObject x="95" y="12" width="160" height="160" color="Green"> <div> <br><br>GEEKSFORGEEKS<br><br> </div> </foreignObject> <rect fill="url(#hatch)" stroke="Green" stroke-width="2" x="5%" y="5%" width="20%" height="20%" /> </svg> </body> </html> Output: Example 2: html <!DOCTYPE html> <html> <body> <svg viewBox="0 0 1100 400"> <defs> <hatch id="hatch" hatchUnits="userSpaceOnUse" pitch="9" rotate="135"> <hatchpath stroke="Green" stroke-width="12" /> </hatch> </defs> <foreignObject x="110" y="12" width="160" height="160" color="Green"> <div> <br><br>GeeksForGeeks<br><br> </div> </foreignObject> <ellipse vfill="url(#hatch)" fill="None" stroke="green" stroke-width="2" cx="164" cy="58" rx="100" ry="50" fill /> </svg> </body> </html> Output: Comment E epistler_999 Follow 2 Improve E epistler_999 Follow 2 Improve Article Tags : Web Technologies HTML HTML-SVG SVG-Element Explore HTML BasicsHTML Introduction5 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 Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 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 List15+ 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