SVG patternContentUnits Attribute Last Updated : 31 Mar, 2022 Comments Improve Suggest changes Like Article Like Report The patternContentUnits attribute is used to indicate which coordinate system must be used for the contents of the <pattern> element. Syntax: patternContentUnits ="userSpaceOnUse" // Or patternContentUnits ="objectBoundingBox" Attribute Values: The patternContentUnits attribute accepts the values mentioned above and described below: userSpaceOnUse: It indicates that all coordinates inside the <pattern> element refer to the user coordinate system as defined when the pattern tile was created.objectBoundingBox: It indicates that all coordinates inside the <pattern> element are values in fractions or percentages of the bounding box of the <pattern> element. Note: Default value is userSpaceOnUse. Example 1: Below is the example that illustrated the use of patternContentUnits attribute using objectBoundingBox value. HTML <!DOCTYPE html> <html> <body> <h1 style="color: green; margin-left: 2%;"> GeeksforGeeks </h1> <svg viewBox="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <pattern id="geek2" width="40%" height="40%" fill="green" patternContentUnits="objectBoundingBox"> <ellipse cx=".2" cy=".1" rx=".2" ry=".1" /> </pattern> <rect width="50" height="50" fill="url(#geek2)" /> </svg> </body> </html> Output: Below is the output generated corresponding to the above code Example 2: Below is the example that illustrated the use of patternContentUnits attribute using userSpaceOnUse value. HTML <!DOCTYPE html> <html> <body> <h1 style="color: green;"> GeeksforGeeks </h1> <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <pattern id="geek2" width="40%" height="40%" fill="green" patternContentUnits="userSpaceOnUse"> <ellipse cx="5" cy="5" rx="2" ry="1" /> </pattern> <rect width="50" height="50" fill="url(#geek2)" /> </svg> </body> </html> Output: Below is the output generated corresponding to the above code 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 Forms5 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 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