Two ways:

<img src="..." border="1" />

or

<img style='border:1px solid #000000' src="..." />
Answer from Diodeus - James MacFarlane on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ css โ€บ css3_border_images.asp
CSS Border Images
With the CSS border-image property, you can define an image to be used as the border around an element.
Discussions

How to tell CSS to put a border around some images, but not other? - Stack Overflow
It was easy with HTML border properties, but they're gone now. All I'm finding is a lot of stuff about the wonderful things CSS does with borders. But how do I tell it to turn on the border for some More on stackoverflow.com
๐ŸŒ stackoverflow.com
CSS Image Border Not Showing Up Completely (7.0)
I've applied a small border around some images of the site (Brine template) using CSS and they look fine in the editor window. However, when I view the site live/refresh, some of the borders are showing up incomplete - for example, maybe the top of the image not having a border, or the right side... More on forum.squarespace.com
๐ŸŒ forum.squarespace.com
7
December 26, 2021
Image border CSS help
For some reason, my image border only wraps the bottom part of the image (see screenshot). Iโ€™m a css dolt. Any idea how to fix this? The template: {{images}} The images field: More on forums.ankiweb.net
๐ŸŒ forums.ankiweb.net
1
0
June 28, 2024
How to make border image only for the bottom?
lol that sounds like a normal image under your content no? Why would you need a border, if its just sitting under your content? More on reddit.com
๐ŸŒ r/css
8
0
November 23, 2023
๐ŸŒ
CSS-Tricks
css-tricks.com โ€บ revisiting-css-border-image
Revisiting CSS border-image | CSS-Tricks
March 21, 2025 - First is the border-image-slice value, where zero pixels ensures that the eight corners and edges stay empty. The fill keyword ensures the middle section is filled with the linear gradient. Second, the border-image-source is a CSS linear gradient that blends blue into red.
๐ŸŒ
W3Schools
w3schools.com โ€บ cssref โ€บ css3_pr_border-image.php
CSS border-image property
โฎ Previous Complete CSS Reference ... ยท More "Try it Yourself" examples below. The border-image property allows you to specify an image to be used as the border around an element....
๐ŸŒ
Neocities
solaria.neocities.org โ€บ guides โ€บ borderimage
Using and Making CSS Border Images
You can use the CSS property border-image to give a custom border to any element, without having to put it in an additional container.
Find elsewhere
๐ŸŒ
Smashing Magazine
smashingmagazine.com โ€บ 2024 โ€บ 01 โ€บ css-border-image-property
The Complex But Awesome CSS border-image Property โ€” Smashing Magazine
January 16, 2024 - There are a few specific aspects of border-image that I think are crucial for understanding how it works. The CSS Backgrounds and Border Module Level 3 specification says border-image should replace any regular border you define, but itโ€™s not always the case.
๐ŸŒ
Squarespace Forum
forum.squarespace.com โ€บ home โ€บ customize with code โ€บ css image border not showing up completely (7.0)
CSS Image Border Not Showing Up Completely (7.0) - Customize with code - Squarespace Forum
December 26, 2021 - I've applied a small border around some images of the site (Brine template) using CSS and they look fine in the editor window. However, when I view the site live/refresh, some of the borders are showing up incomplete - for example, maybe the top of the image not having a border, or the right side...
๐ŸŒ
HTML AM
html.am โ€บ html-codes โ€บ image-codes โ€บ html-image-borders.cfm
HTML Image Borders
You create HTML image borders by using Cascading Style Sheets (CSS). Specifically, you use the CSS border property. You can also use other CSS properties to create HTML borders (such as border-width, border-style and border-color), but these don't do anything that border doesn't do.
๐ŸŒ
Programiz
programiz.com โ€บ css โ€บ border-image
CSS border-image Property (With Examples)
CSS border-image property sets the image as a border of an element. In this tutorial, you will learn about CSS border-image with the help of examples.
๐ŸŒ
W3Schools
w3schools.com โ€บ howto โ€บ howto_css_border_image.asp
How To Add a Border to an Image
Learn how to add a border around an image. Use the border property to add a border to an <img> element: img { border: 5px solid #555; } Try it Yourself ยป ยท Go to our CSS Images Tutorial to learn more about how to style images.
๐ŸŒ
SitePoint
sitepoint.com โ€บ html & css
I need help creating rounded images with borders - HTML & CSS - SitePoint Forums | Web Development & Design Community
June 17, 2023 - Hi there. Please can anyone help me by explaining how I make a photograph round with 2 outer borders of different colours as in the example here (upper left corner of the page): https://ishadeed.com/. I guess this can beโ€ฆ
๐ŸŒ
Squarespace Forum
forum.squarespace.com โ€บ home โ€บ images & videos โ€บ how to add borders around images
How to add borders around images - Images & Videos - Squarespace Forum
July 15, 2020 - I figured out the problem - When image crop is turned on, the border crops off. Turn image crop on original. You will just have to pre-size your images before uploading ... DOM elements are block based and the CSS border property address those blocks, so CSS border property can not do irregular shapes.