HTML DOM Mark Object Last Updated : 14 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The Mark Object in HTML DOM is used to represent the HTML <mark> element. The Mark Object is new in HTML 5. The <mark> element can be accessed by using the getElementById() method. Syntax: document.getElementById("id") Where id is assigned to the <mark> tag. Note: This tag is not supported by Internet Explorer and earlier versions. Example 1: In this example, we will see the use of DOM Mark Object. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Mark Object </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM mark Object</h2> <p> A <mark id="mark_obj">computer science</mark> portal for geeks. </p> <button onclick="Geeks()"> Click Here </button> <script> function Geeks() { let txt = document.getElementById("mark_obj"); txt.style.fontSize = "x-large"; } </script> </body> </html> Output: Example 2: Mark Object can be created by using the document.createElement method. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Mark Object </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM mark Object</h2> <button onclick="Geeks()"> Click Here! </button> <br><br> <div> A <span id="p"></span> portal for geeks. </div> <script> function Geeks() { let txt = document.createElement("MARK"); let t = document.createTextNode("computer science"); txt.appendChild(t); document.getElementById("p").appendChild(txt); } </script> </body> </html> Output: Supported Browsers: Google ChromeInternet Explorer (after IE 9)Mozilla FirefoxOperaSafari Comment More infoAdvertise with us V Vishal Chaudhary 2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM Similar Reads 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 HTML DOM Paragraph Object The DOM paragraph object is used to represent the HTML <p> element. The p element is accessed by getElementById(). Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the p tag. The below programs illustrate the p object: Property Values align: It is used to set or return t 2 min read HTML DOM Label Object The DOM Label Object is used to represent the <label> element. The Label element is accessed by getElementById(). Properties: control: It is used to return the labeled control.form: It is used to return the address of the form that contains the label.htmlFor: It is used to set or return the va 2 min read HTML DOM Footer Object The DOM footer object is used to represent the HTML <footer> element. The footer element can be accessed using the getElementById() method. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the footer tag. Example 1: In the below program the footer element is accessed and 1 min read HTML DOM Style borderRightColor Property 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 2 min read HTML DOM fullscreenElement Property The fullscreenElement property in HTML is used to return the element that is currently in fullscreen. This property may require specific prefixes to work with different browsers. Syntax:document.fullscreenElementReturn Value: Returns the element that is currently in full-screen mode, or null if full 2 min read Like