HTML img border Attribute
HTML <img> tag
Definition and Usage
The border attribute specifies the width of the border around an image.
By default, an image will have no border. The border attribute allows set a
border and specify the border width in pixels
Compatibility Notes
The border attribute of the img element was deprecated in HTML 4.01
and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <img style="border:4px solid black"/>
In our CSS tutorial you can find more details about the
border property.
Syntax
Syntax Example
Attribute Values
Value |
Description |
pixels |
Specifies the border width in pixels |
Browser Support

The attribute is deprecated, but still supported in all major browsers.
Example
Source |
Output |
<img src="demo_img.jpg"
alt="W3Schools example picture"
border="4" />
|
|
Try-It-Yourself Demos
img border
attribute example
Specify the border width of an image.
In CSS: image
border
Specify the border width, style, and color of an image.
HTML <img> tag
Learn how your website performs under various load conditions
 |
|
WAPT
is a load, stress and performance testing tool for websites and web-based applications.
In contrast to "800-pound gorilla" load testing tools, it is designed to minimize the learning
curve and give you an ability to create a heavy load from a regular workstation.
WAPT is able to generate up to 3000 simultaneously acting virtual users using standard hardware configuration.
Virtual users in each profile are fully customizable. Basic and NTLM authentication methods are supported.
Graphs and reports are shown in real-time at different levels of detail, thus helping to manage the testing process.
Download the free 30-day trial!
|
|