目录

How TO - Add a Border to an Image


Learn how to add a border around an image.


Border Around an Image

NatureSnow

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.