HTML DOM Style borderRightColor Property Last Updated : 14 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The borderRightColor property allows us to set/get the color to the right border of an element. Syntax: It is used to return the borderRightColor property. object.style.borderRightColorIt is used to set the borderRightColor property. object.style.borderRightColor = "color|transparent|initial|inherit" Return Value: The borderRightColor property returns the color of the right border of an element. Property Values: color: It specifies the right border color of the corresponding element. Black is the default color.transparent: It sets the right border color of the corresponding element to transparent. Example 1: In this example, we will see the use of DOM style borderRightColor property HTML <!DOCTYPE html> <html> <head> <style> #GFG_Div { width: 200px; margin-left: 210px; border: thick solid green; } </style> </head> <body> <p> Click to change the right border color of element.</p> <button type="button" onclick="myGeeks()"> Click to change </button> <br> <br> <div id="GFG_Div">GeeksforGeeks</div> <script> function myGeeks() { document.getElementById("GFG_Div") .style.borderRightColor = "red"; } </script> </body> </html> Output: Example 2: In this example, we will see the use of DOM style borderRightColor property HTML <!DOCTYPE html> <html> <head> <style> #GFG_Div { width: 200px; border: thick solid green; } </style> </head> <body> <p> Click to change the right border color of element.</p> <button type="button" onclick="myGeeks()"> Click to change </button> <br> <br> <div id="GFG_Div">GeeksforGeeks</div> <script> function myGeeks() { document.getElementById("GFG_Div") .style.borderRightColor = "yellow"; } </script> </body> </html> Output: Example: In this example, we will use the transparent property. HTML <!DOCTYPE html> <html> <head> <style> #GFG_Div { width: 200px; border: thick solid green; } </style> </head> <body> <p> Click to change the right border color of element.</p> <button type="button" onclick="myGeeks()"> Click to change </button> <br> <br> <div id="GFG_Div">GeeksforGeeks</div> <script> function myGeeks() { document.getElementById("GFG_Div") .style.borderRightColor = "transparent"; } </script> </body> </html> Output: initial: When no value is specified for this field, it is inherited from the parent of the element. If there is no parent means this element is root then it takes the initial(or default) value.inherit: This keyword applies the initial(or default) value of a property to an element. The initial value should not be confused with the value specified by the browser’s style sheet. When borderColor sets to initial, It appears as black(default) color. Browser Support: The browser supported by DOM Style borderRightColor property is listed below: Google Chrome: SupportedInternet Explorer: SupportedMozilla Firefox: SupportedSafari: SupportedOpera: Supported Comment More infoAdvertise with us P PranchalKatiyar Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM HTML-Property +1 More Similar Reads HTML DOM HR Object The DOM HR Object is used to represent the HTML <hr> element. The hr element is accessed by getElementById(). Properties: Align: It is used to set or return the alignment of a horizontal element.color: It is used to set or return the color of the horizontal element.noshade: It is used to set o 2 min read HTML DOM Header Object The DOM header object is used to represent the HTML <header> element. The header element can be accessed by the getElementById() method. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the header tag. Example 1: In the below program the header element is accessed and th 1 min read HTML DOM Style border Property The HTML DOM Style border Property is used to set or return the style of an element's border. We can set the different styles of the border for individual sides (top, right, bottom, left). The border-style property can take multiple values for each side. SyntaxIt is used to return the Style Propert 2 min read HTML DOM Span Object The DOM span object is used to represent the HTML <span> element. The span element can be accessed by using the getElementById() method. Syntax: document.getElementById("id"); Where 'id' is the ID assigned to the span tag. Example 1: In the below program the content inside the span element is 1 min read HTML DOM Input Button Object The DOM Input Type Button Object is used to represent the HTML <input> element with type="button". The Input Type Button element is accessed by getElementById(). Syntax: document.getElementById("ID"); Where âidâ is the ID assigned to the âinputâ tag. Example 1: In this example, we will see the 2 min read HTML DOM Address Object The DOM address object is used to represent the HTML <address> element. The address element can be accessed using the getElementById() method. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the address tag. Example 1: In the below program the address element is accesse 1 min read HTML DOM dl Object The DOM dl object is used to represent the HTML <dl> element. The dl element can be accessed using the getElementById() method. The dl is used to create a description list in HTML. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the dl tag. Example 1: In the below progr 1 min read HTML | DOM DT Object The DOM dt object is used to represent the HTML <dt> element. The dt element can be accessed using the getElementById() method. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the dt tag. Example-1: html <!DOCTYPE html> <html> <body> <h1 style = 1 min read HTML | DOM Style borderTopColor Property The borderTopColor property allows us to set/get the color of top border of element. Syntax: It returns the borderTopColor property. object.style.borderTopColorIt is used to set the borderTopColor property. object.style.borderTopColor = "color|transparent|initial| inherit" Return Value:The borderTop 2 min read HTML DOM Style borderLeftColor Property The borderLeftColor property in HTML DOM allows us to set/get the color to the left border of an element. Syntax: It is used to return the borderLeftColor property. object.style.borderLeftColorIt is used to set the borderLeftColor property. object.style.borderLeftColor = "color | transparent | ini 2 min read Like