HTML | DOM Style backgroundRepeat Property Last Updated : 09 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The backgroundRepeat property in HTML DOM is used to set or return the CSS backgroundRepeat property. It also checks whether the background-image is repeated or not. Syntax: It is used to returns the backgroundRepeat property.object.style.backgroundRepeat It is used to set the backgroundRepeat property.object.style.backgroundRepeat = "repeat|repeat-x|repeat-y| no-repeat|initial|inherit" Property Values: repeat: It is used to repeat the background image both horizontally and vertically. It is the default value.repeat-x: It is used to repeat the background image horizontally.repeat-y: It is used to set the background image repeated only vertically.no-repeat: It does not repeat the background image. It displays the background image only once. Return Value: It returns a string value which represent how to background image repeated. Example 1: html <!DOCTYPE html> <html> <head> <title> DOM Style background-repeat property </title> <style> body { background-image: url( "https://media.geeksforgeeks.org/wp-content/uploads/geeks-25.png"); background-size: 200px 150px; text-align:center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2> DOM Style backgroundRepeat Property </h2> <button onclick = "myGeeks()"> Submit </button> <script> function myGeeks() { document.body.style.backgroundRepeat = "no-repeat"; } </script> </body> </html> Output: Before Click on the button: After Click on the button: Example 2: html <!DOCTYPE html> <html> <head> <title> DOM Style background-repeat property </title> <style> body { background-image: url( "https://media.geeksforgeeks.org/wp-content/uploads/geeks-25.png"); background-repeat: repeat-y; background-size: 200px 150px; text-align:center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2> DOM Style backgroundRepeat Property </h2> <button onclick = "myGeeks()"> Submit </button> <script> function myGeeks() { document.body.style.backgroundRepeat = "repeat-x"; } </script> </body> </html> Output: Before Click on the button: After Click on the button: Supported Browsers: The browser supported by DOM Style backgroundRepeat property are listed below: Google Chrome 1.0 and aboveEdge 12 and aboveInternet Explorer 4.0 and aboveFirefox 1.0 and aboveOpera 3.5 and aboveSafari 1.0 and above Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM Section Object The Section Object in HTML DOM is used to represent the HTML <section> element. The section element can be accessed by using the getElementById() method. Syntax: document.getElementById("id") Where id is assigned to the <section> tag. Example 1: In this example, we will use DOM Section O 1 min read HTML DOM Nav Object The DOM nav object is used to represent the HTML <nav> element. The<nav> element is accessed by getElementById(). Syntax: document.getElementById("id") Where id is assigned to the <nav> tag. Note: The Nav Object is not supported by Internet Explorer 8 and earlier versions. Example 1 min read HTML DOM insertAdjacentText() Method The insertAdjacentText() inserts a provided text at one of the following positions. afterbegin:afterend:beforebegin:beforeend: Syntax: node.insertAdjacentText(position, text) Parameters: This method requires 2 parameters. position: A position relative to the element. The legal values are:afterbegin: 1 min read HTML DOM Style borderImage Property The DOM Style borderImage Property in HTML is a shorthand property used for setting the borderImageSource, borderImageSlice, borderImageWidth,borderImageOutset, and borderImageRepeat properties. Syntax: It is used to return the borderImage property. object.style.borderImageIt is used to set the bord 2 min read HTML DOM stopPropagation() Event Method The stopPropagation() method is used to stop the propagation of event calling. That is a parent event is called we can stop the propagation of calling its children by using the stopPropagation() method and vice-versa. Syntax: event.stopPropagation() Return Value: It does not return any value. Exampl 2 min read HTML DOM Emphasized Object The HTML DOM Emphasized object represents the <em> element, used to emphasize text, typically rendering it in italics. It can be accessed and manipulated through JavaScript to alter its content or styling.Syntax:document.getElementById("ID");Example: Clicking the "Submit" button changes the em 1 min read HTML DOM type Event Property The type event property in HTML DOM is used to return the type of the triggered event. It returns a string that represents the type of the event. The events can be keyboard events or mouse events. Syntax: event.type Return Value: It returns a string that represents the type of event. Example: In thi 1 min read HTML DOM timeStamp Event Property The timeStamp property in the HTML DOM refers to a read-only property that returns the time (in milliseconds) at which an event was created. The value is measured relative to the UNIX epoch (January 1, 1970, 00:00:00 UTC). This property is commonly used to determine the timing of events and can be u 1 min read HTML | DOM Details Object The DOM Details Object is used to represent the HTML <details> element. The Details element is accessed by getElementById(). Properties: open: The details tag has an attribute called 'open' which is used to display the hidden information by default. Syntax: document.getElementById("ID"); Where 2 min read HTML DOM cancelable Event Property The cancelable event property indicates whether the event's default action can be prevented. If the value is true, the default action can be prevented using event.preventDefault(). If false, the default action cannot be prevented. It is a read-only property.It is a read-only boolean property.Syntax: 1 min read Like