HTML Image Borders
To change the appearance of image borders, you need to use CSS (Cascading Style Sheets). You can include CSS in your images using the style attribute of the HTML img tag. You can use the HTML code on this page to determine image borders within your HTML document.
Below are some examples of what you can do with HTML image borders using CSS.
Solid Border
| Code | Result |
|---|---|
|
|
|
Dotted Border
| Code | Result |
|---|---|
|
|
|
Grooved Border
| Code | Result |
|---|---|
|
|
|
Double Border
| Code | Result |
|---|---|
|
|
|
Outset Border
| Code | Result |
|---|---|
|
|
|
Inset Border
| Code | Result |
|---|---|
|
|
|
Ridged Border
| Code | Result |
|---|---|
|
|
|
Dashed Border
| Code | Result |
|---|---|
|
|
|
Mixed Border
| Code | Result |
|---|---|
|
|
|
The above code uses the CSS border property which is shorthand for the various border properties (such as border-style, border-color etc. For more info, check out the various border properties on the CSS Properties list.

