HTML The border attribute HTML tag Example An object with a 5-pixel thick border : Try it » Browser support All major browsers support the border attribute. Definition and Usage HTML5 does not support The border attribute. Use CSS instead. In HTML 4.01, The border attribute is deprecated. The border attribute specifies the width of the border around the element. Compatibility notes In HTML 4.01, The border attribute is deprecated. Use CSS instead. CSS syntax: CSS example: an element with a border In our CSS tutorial, you can find more details about The border attributedetails. Syntax Attribute values Value Description pixels The width of the border, in pixels. HTML tag