A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-img-border-attribute/ below:

HTML | <img> border Attribute

HTML | <img> border Attribute

Last Updated : 21 Jan, 2022

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. Use CSS instead of this attribute.

Syntax:
<img border="pixels">
Attribute Values:

It contains single value pixels which specify the width of the border.

Example: html
<!DOCTYPE html>
<html>

<head>
    <title>
        HTML img border Attribute
    </title>
</head>

<body>
    <h1>GeeksforGeeks</h1>

    <h2>HTML img border Attribute</h2>

    <img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20190506164011/logo3.png" 
         alt="GeeksforGeeks logo" 
         border="5">
</body>

</html>
Output: Supported Browsers:

The browser supported by

HTML <img> border attribute

are listed below:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4