HTML | DOM Column Object Last Updated : 29 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Column Object in HTML DOM is used to represent the HTML <col> element. This tag is used to set or get the properties of <col> element. It can be accessed by using getElementById() method.Syntax: document.getElementById("Col_ID"); This Col_ID is assigned to HTML < col > element.Property Values: span: Used to set or return span attribute. Example-1: Returning "col id" using document.getElementById("myCol").id; html <!DOCTYPE html> <html> <head> <title> HTML | DOM Column Object </title> </head> <style> #myCol { background: green; } table { color: white; margin-left: 150px; } #Geek_p { color: green; font-size: 30px; } td { padding: 10px; } </style> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>HTML | DOM Column Object</h2> <table> <colgroup> <col id="myCol" span="2"> <col style="background-color:green"> </colgroup> <tr> <th>S.No</th> <th>Title</th> <th>Geek_id</th> </tr> <tr> <td>Geek_1</td> <td>GeekForGeeks</td> <th>Geek_id_1</th> </tr> <tr> <td>Geek_2</td> <td>GeeksForGeeks</td> <th>Geek_id_2</th> </tr> </table> <br> <button onclick="myGeeks()"> Click </button> <h4> <p id="Geek_p" style="color:green"></p> </h4> <script> function myGeeks() { // Get the Id of Column Element var x = document.getElementById( "myCol").id; document.getElementById( "Geek_p").innerHTML = x; } </script> </body> </html> Output Before click on the button: After click on the button: Example-2: Returning number of span element from "col id" using document.getElementById("myCol").span; html <!DOCTYPE html> <html> <head> <title> HTML | DOM Column Object </title> </head> <style> #myCol { background: green; } table { color: white; margin-left: 150px; } #Geek_p { color: green; font-size: 30px; } td { padding: 10px; } </style> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>HTML | DOM Column Object</h2> <table> <colgroup> <col id="myCol" span="2"> <col style="background-color:green"> </colgroup> <tr> <th>S.No</th> <th>Title</th> <th>Geek_id</th> </tr> <tr> <td>Geek_1</td> <td>GeekForGeeks</td> <th>Geek_id_1</th> </tr> <tr> <td>Geek_2</td> <td>GeeksForGeeks</td> <th>Geek_id_2</th> </tr> </table> <br> <button onclick="myGeeks()"> Click </button> <h4> <p id="Geek_p" style="color:green"></p> </h4> <script> function myGeeks() { // return the value of span attribute of Column element var x = document.getElementById( "myCol").span; document.getElementById( "Geek_p").innerHTML = x; } </script> </body> </html> Output Before click on the button: After click on the button: Supported Browsers: Google ChromeMozilla FirefoxEdgeSafariOpera Comment More infoAdvertise with us P PranchalKatiyar Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Map Object The Map Object in HTML DOM is used to create and access the <map> element. The Map Object create the portion of image clickable and accessible.Syntax: It is used to return Map object.var x = document.getElementById("myMap");It is used to create Map Object.var x = document.createElement("MAP"); 2 min read HTML | DOM Style backgroundImage Property The DOM Style backgroundImage Property is used to set or return the background image of an element. Syntax: To get the backgroundImage propertyobject.style.backgroundImageTo set the backgroundImage propertyobject.style.backgroundImage = "image | none | initial | inherit" Return Values: It returns a 3 min read HTML | DOM TableRow Object The TableRow Object in HTML DOM is used to represent the HTML <tr> element. The <tr> element can be accessed by using getElementById() method. Syntax: document.getElementById("id"); The tr element can be created by using the document.createElement() method. Syntax: document.createElement 3 min read HTML DOM Style order Property The HTML DOM Style order property specifies the order of a flexible element relative to the rest of the flexible elements inside the same container element. SyntaxSet the order property.object.style.order = "number | initial | inherit"Return the order property.object.style.orderReturn ValuesIt retu 1 min read HTML | DOM Embed Object The Embed Object in HTML DOM is used to represent the <embed> element. The <embed> element can be accessed by using getElementById() method. Note: This object is new in HTML 5. Property Values: height: It sets or returns the value of the height attribute. src: It sets or returns the valu 2 min read HTML DOM Anchor Object The Anchor Object in HTML DOM is used to represent the <a> element. The anchor element can be accessed by using getElementById() method. Syntax: document.getElementById("ID"); Where ID is assigned to the anchor tag. Property Values: Property Description charset Set or return the character set. 2 min read HTML DOM ColumnGroup Object The ColumnGroup Object in HTML DOM is used to represent the HTML <colgroup> element. This tag is used to set or return the properties of <colgroup> element. It can be accessed by using getElementById() method. Syntax: document.getElementById( "ColGroup_ID" );This ColGroup_ID is assigned 2 min read HTML | DOM Window frameElement Properties HTML DOM Window frameElement property returns the iframe element in which the window is embedded or stored. If it is not stored, in that case, it simply returns a null value. Syntax: window.frameElement Return Value: It returns an IFrame object or null. Example: html <!DOCTYPE html> <html 1 min read HTML | DOM Style columnRuleStyle Property The DOM style columnRuleStyle Property in HTML is used to define or determine the style of rule between columns. Syntax : To set the property: object.style.columnRuleStyle = "none|hidden|dotted|dashed|solid| double|groove|ridge|inset|outset|initial|inherit" To return the property: object.style.colum 6 min read HTML | DOM Style columnRuleWidth Property The Style columnRuleWidth property in HTML DOM is used to define or determine the width of the rule between the columns. Syntax: It returns the columnRuleWidth property.object.style.columnRuleWidthIt is used to set columnRuleWidth property.object.style.columnRuleWidth = "medium|thin|thick|length| in 3 min read Like