Filter (Advanced Search)
Downloads
9
Views
438
Video

Create Rounded/Circle Image | Images

Details
Step 1) Add HTML:

Example

<img src="/images/cat.jpg">


Step 2) Add CSS:

Use the border-radius property to add rounded corners to an image. 50% will make the image circular:

Example

img {
  border-radius: 50%;
}

 

<img src="/images/cat.jpg" alt="cat" style="border-radius:50%;width:200px;">


<!DOCTYPE html>
<html>
<head>
<title>Rounded Images</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h2>Rounded Images</h2>
<hr>
<h4>Simple Image</h4>
<img src="/images/cat.jpg" alt="cat" style="width:200px"><hr>

<h2>Rounded Image</h2>
<img src="/images/cat.jpg" alt="cat" style="border-radius:50%;width:15%;">
<img src="/media/StudentsPics/4207763.jpg" alt="cat" style="border-radius:50%;width:120px;">
<img src="/media/StudentsPics/4207762.jpg" alt="cat" style="border-radius:10%;width:120px;">

</body>
</html>


Output


Ad