HTML | <img> border Attribute
The <img> border attribute is used to specify the border width around the image. The default value of <img> border attribute is 0.
It is not supported by HTML 5. HTML 5 uses CSS instead of this attribute.
Syntax:
<img border="pixels">
Attribute Values: It contains single value pixels which specify the width of the border.
Example:
<!DOCTYPE html> <html> <head> <title> HTML img border Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML img border Attribute</h2> <img src= alt="GeeksforGeeks logo" border="5"> </body> </html> |
Output:

Supported Browsers: The browser supported by HTML <img> border attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
- HTML | <table> border Attribute
- HTML | <object> border Attribute
- HTML | DOM Style border Property
- HTML | <map> name Attribute
- HTML | value Attribute
- HTML | dir Attribute
- HTML | low Attribute
- HTML | min Attribute
- HTML | <a> rel Attribute
- HTML | <li> value Attribute
- HTML | <img> src Attribute
- HTML | <img> alt Attribute
- HTML | for Attribute
- HTML | oncopy Attribute
- HTML | type Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



