border(HTML attribute)

Syntax

border="number"

Description

By
default, an image will display without a border (unless it’s contained
inside an a element and CSS has
not been used to remove the border). The
border attribute rectifies this, and allows you to
specify a border in pixels. Depending on the browser, the border will
either be black, or will match the color of the document’s text.

Example

Value

This attribute takes as its
value a number that represents the width of the border in
pixels.

Compatibility

Internet Explorer

Firefox

Safari

Opera

Chrome

5.5

6.0

7.0

8.0

1.0

1.5

2.0

3.0

3.5

1.3

2.0

3.1

4.0

9.2

9.5

10.0

2.0

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Full

Although support for this attribute is
good, it’s now deprecated, and is highly presentational in its nature. The
desired visual effects can all be achieved with CSS and, as such, this
attribute shouldn’t be used—it’s presented here for informational purposes
only.