HTML | DOM Style borderRadius Property

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.

Syntax: It is used to set the borderRadius property. = “1-4 length|% / 1-4 length|%|initial|inherit

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() {
                document.getElementById("GFG").style.borderRadius = "25px";


Before clicking on the button:

After clicking on the button:

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

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

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.