Image Code

HTML Image Border Code

Frame an image with a border, and optionally round the corners.

Live Tool
image-border.html Live

          
Preview

1How To Use

Follow these steps — no coding experience needed.

  1. Set a border width and colourA thin, brand-coloured border adds definition.
  2. Round the cornersHigher values feel softer and more modern; 999px makes a perfect circle on a square image.
  3. Copy and pasteDrop the style attribute onto any tag.

2Example Output

What this code looks like once it's on a real page.

Rounded example

3Browser Compatibility

BrowserSupportNotes
Chrome✓ SupportedFull support
Firefox✓ SupportedFull support
Safari✓ SupportedFull support
Edge✓ SupportedFull support
Opera✓ SupportedFull support
Mobile browsers✓ SupportedFull support, iOS & Android

Supported in every current browser — Chrome, Firefox, Safari, Edge and Opera all render this identically, on both desktop and mobile.

Related Pages

More tools that pair naturally with this one.