CSS - border
border is a shorthand property which sets the style, color, and width of the border around an element.
Possible value is one or more of a color, a value for border-width, and a value for border-style.
All the HTML elements.
object.style.border = "2px solid red";
Following is the example to show to use all the three properties into a single property. This is the most frequently used property to set border around any element.
<html> <head> </head> <body> <p style="border:4px solid red;"> This example is showing shorthand property for border. </p> </body> </html>
It will produce the following result −