The
border attribute is used to specify the border width around the image. The default value of
border attribute is 0.
It is not supported by HTML 5. Use CSS instead of this attribute.
Syntax:
html
Output:
Supported Browsers: The browser supported by HTML
borderĀ attribute are listed below:
Attribute Values: It contains single value pixels which specify the width of the border. Example:
<html>
<head>
<title>
HTML img border Attribute
title>
head>
<body>
<h1>GeeksforGeeksh1>
<h2>HTML img border Attributeh2>
<img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20190506164011/logo3.png"
alt="GeeksforGeeks logo"
border="5">
body>
html>
Supported Browsers: The browser supported by HTML - Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera