Skip to content
Related Articles

Related Articles

Improve Article

HTML | DOM Style borderRadius Property

  • Last Updated : 30 Jul, 2019

The DOM Style borderRadius Property is used to set or return the four different borderRadius property such as borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius of an element. It is used to add the 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 corner in percentage.
    • initial: This will set the property to it’s default value.
    • inherit: This will inherit the property from it’s parent element.

    Return Value: It returns a string value which represent the top, left, bottom borderRadius of an element.


    <!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">
                <h2>GeeksforGeeks</h2> </div>
            <button onclick="Geeks()">Submit</button>
                function Geeks() {
                                                            = "25px";

    Before clicking on the button:

    After clicking on the button:

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

    • Google Chrome 1.0
    • Internet Explorer 4.0
    • Firefox 1.0
    • Opera 3.5
    • Apple Safari 1.0

    Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

    My Personal Notes arrow_drop_up
  • Recommended Articles
    Page :