
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How can I display an image inside SVG circle in HTML5?
To display an image inside SVG circle, use the <circle> element and set the clipping path. The <clipPath> element is used to define a clipping path. Image in SVG is set using the <image> element.
Example
You can try to run the following code to learn how to display an image inside SVG circle in HTML5
<!DOCTYPE html> <html> <head> <title>HTML5 SVG Image</title> <head> <body> <svg width="500" height="350"> <defs> <clipPath id="myCircle"> <circle cx="250" cy="145" r="125" fill="#FFFFFF" /> </clipPath> </defs> <image width="500" height="350" xlink:href="https://www.tutorialspoint.com/videotutorials/images/coding_ground_home.jpg" clip-path="url(#myCircle)" /> </svg> </body> </html>
- Related Articles
- How can I display an image using cv2 in Python?
- How can I display an image using Pillow in Tkinter?
- Draw part of an image inside HTML5 canvas
- Display video inside HTML5 canvas
- How to draw an SVG file on an HTML5 canvas?
- Drawing an SVG file on an HTML5 canvas
- How to draw SVG Logo in HTML5?
- How to use SVG images in HTML5?
- How to draw a rectangle in HTML5 SVG?
- How to draw a polygon in HTML5 SVG?
- How to draw a polyline in HTML5 SVG?
- How to draw a star in HTML5 SVG?
- How to draw shapes using SVG in HTML5?
- How can I get the output of a Matplotlib plot as an SVG?
- How can I add an image on EditText?

Advertisements