How TO – Rounded Images
Learn how to create rounded and circular images with CSS.
Rounded Images
![]()
How To Create Rounded Images
Step 1) Add HTML:
Example
<img src=”img_avatar.png” alt=”Avatar”>
Step 2) Add CSS:
Use the border-radius property to add rounded corners to an image. 50% will make the image circular:
Example
<!DOCTYPE html>
<html>
<head>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<style>
img {
border-radius: 50%;
}
</style>
</head>
<body>
<h2>Rounded Images</h2>
<img src=”img_avatar.png” alt=”Avatar” style=”width:200px”>
</body>
</html>