Computer >> Computer tutorials >  >> Programming >> CSS

Create circled image with CSS


To create a circled image with CSS, use the border-radius property.

Example

<!DOCTYPE html>
<html>
   <head>
      <style>
         img {
            border-radius: 50%;
            border: 1px solid blue;
         }
      </style>
   </head>
   <body>
      <h2>Coding Ground</h2>
      <img src = "https://www.tutorialspoint.com/videotutorials/images/coding_ground_home.jpg" alt="Online Compiler" width="300" height="300">
   </body>
</html>