Open In App
Related Articles

HTML DOM Style borderRadius Property

Improve Article
Save Article
Like Article

The DOM Style borderRadius Property is used to set or return the four different borderRadius properties such as borderTopRightRadius, borderBottomRightRadius, and borderBottomLeftRadius of an element. It is used to add a rounded corner in an element. 


  • It is used to get the border radius property.
  • It is used to set the borderRadius property. = "1-4 length|% / 1-4 length|%

Property values:

  • length: This will define the shape of the corner default value is 0.
  • %: This will also define the shape of the corner in percentage.
  • initial: This will set the property to its default value.
  • inherit: This will inherit the property from its parent element.

Return Value: It returns a string value that represents the top, left, and bottom borderRadius of an element. 

Example: In this example, we will use DOM Style borderRadius


<!DOCTYPE html>
    <title>DOM Style borderRadius Property</title>
        h1 {
            color: green;
            font-size: 35px;
        #GFG {
            background: #009900;
            padding: 30px;
            text-align: center;
            width: 300px;
            height: 120px;
        <h2>DOM Style borderRadius Property</h2>
        <div id="GFG">
        <button onclick="Geeks()">Submit</button>
            function Geeks() {
                    = "25px";



Supported Browsers: The browser supported by DOM Style borderRadius property are listed below:

  • Google Chrome 4.0
  • Edge 12
  • Internet Explorer 9.0
  • Firefox 4.0
  • Opera 10.5
  • Apple Safari 5.0

Last Updated : 15 Jun, 2023
Like Article
Save Article
Similar Reads
Related Tutorials