Style borderTopLeftRadius Property
Example
Add a rounded border to the top-left corner of a div element:
document.getElementById("myDIV").style.borderTopLeftRadius="25px";
Try it »
Definition and Usage
The borderTopLeftRadius property sets or returns the shape of the top-left corner border.
**Tip:** This property allows you to add rounded borders to an element!
Browser support

IE9+, Firefox, Chrome, Safari, and Opera support the borderTopLeftRadius property.
Syntax
Return the borderTopLeftRadius property:
object
.style.borderTopLeftRadius
Set the borderTopLeftRadius property:
object
.style.borderTopLeftRadius="
length
|
%
[
length
|
%
]|initial|inherit"
**Note:** The two values of length or percentage for border-top-left-radius define the radius of a quarter ellipse, that is, the shape of the corner of the outer border edge. The first value is the horizontal radius, and the second value is the vertical radius. If the second value is omitted, it is copied from the first value. If both lengths are 0, the corner is square, not round. The percentage for the horizontal radius is relative to the width of the bounding box, and the percentage for the vertical radius is relative to the height of the bounding box.
Attribute values
| Value | Description |
|---|---|
| length | Defines the shape of the top-left corner. |
| % | Defines the shape of the top-left corner in %. |
| initial | Sets this property to its default value. See initial. |
| inherit | Inherits this property from its parent element. See inherit. |
Technical Details
| Default value: | 0 |
|---|---|
| Return Value: | A string that represents the border-top-left-radius property of an element. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:border-top-left-radius property
The Style object