How TO - Add a Border to an Image


Learn how to add a border around an image.


Border Around an Image

Nature Snow

How To Add a Border to an Image

Use the border property to add a border to an <img> element:

Example

img {
  border: 5px solid #555;
}
Try it Yourself »

Go to our CSS Images Tutorial to learn more about how to style images.


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.