HTML DOM Aside Object Last Updated : 15 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The DOM Aside Object is used to represent the HTML <Aside> element. The Aside element is accessed by getElementById(). The aside Element is new in HTML 5. Syntax: document.getElementById("ID"); where "id" is the ID assigned to the aside tag. Example 1: In this article, we will learn DOM Aside Object. HTML <!DOCTYPE html> <html> <head> <title>HTML DOM Aside Object</title> <style> .gfg { font-size: 30px; } aside { font-size: 40px; color: #090; font-weight: bold; } p { font-size: 20px; margin: 20px 0; } </style> </head> <body> <!-- Assign ID to the aside tag. --> <aside id="GFG"> <h1>GeeksforGeeks</h1> <p>A computer science portal for geeks</p> </aside> <h2 style="font-size:35px;">DOM Aside object</h2> <button onclick="myGeeks()">Submit</button> <script> function myGeeks() { let w = document.getElementById("GFG"); w.style.color = "red"; } </script> </body> </html> Output: Example 2: Aside Objects can be created by using the document.createElement Method. HTML <!DOCTYPE html> <html> <head> <title>HTML DOM Aside Object</title> <style> .gfg { font-size: 30px; } p { font-size: 20px; margin: 20px 0; } </style> </head> <body> <h2 style="font-size:35px;">DOM Aside object</h2> <button onclick="myGeeks()">Submit</button> <script> function myGeeks() { let w = document.createElement("ASIDE"); w.setAttribute("id", "GFG"); document.body.appendChild(w); let heading = document.createElement("H3"); let text1 = document.createTextNode("GeeksForGeeks"); heading.appendChild(text1); document.getElementById("GFG" ).appendChild(heading); let para = document.createElement("P"); let text2 = document.createTextNode( "A Computer Science Portal for Geeks."); para.appendChild(text2); document.getElementById("GFG" ).appendChild(para); } </script> </body> </html> Output: Supported Browsers: The browser supported by DOM Aside Object are listed below: Google ChromeInternet ExplorerFirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML DOM Canvas Object M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML Web technologies HTML-DOM +1 More Practice Tags : Misc Similar Reads HTML DOM fullscreenEnabled() Method The fullscreenEnabled() method in HTML DOM is used to check whether the document can be viewed in full-screen mode or not. It returns a single read-only Boolean value. This method may require specific prefixes to work with different browsers. Syntax:document.fullscreenEnabled()Parameters: This metho 2 min read HTML DOM Caption Object The DOM Caption Object is used to represent the HTML <Caption> element (A caption element is used to specify the caption of a table). The Caption element is accessed by getElementById(). Properties: It has a align Attribute which is used to set or return the alignment of the caption. Syntax: d 2 min read HTML DOM Canvas Object The DOM Canvas Object is used to represent the HTML <Canvas> element. The <canvas> tag is used to draw graphics in the document using javascript. It is new in HTML5. The canvas element is accessed by getElementById(). Syntax: accessed by getElementById("id"). Where âidâ is the ID assigne 2 min read HTML DOM importNode() Method The HTML | DOM importNode() Method creates a copy of a node from another document and imports it to the current document. Syntax: document.importNode(externalNode, [deep]) Parameters: externalNode: Node which we need to import from another document, it can be of any type.[deep]: We can set its val 2 min read HTML DOM inputEncoding Property The inputEncoding property returns the character encoding used for parsing the document. This property doesn't have any default value. Syntax:document.inputEncodingParameters:The HTML DOM inputEncoding property does not require any parameter.Return Value:The HTML DOM inputEncoding property returns a 2 min read HTML DOM normalizeDocument() Method The normalizeDocument() method in HTML is used to normalize an HTML document by remove any empty text nodes if exists. After removing the empty nodes, it also merges all of the adjacent nodes present in the document. For Example, consider the below element: Element Geeks Text node: "" Text node: "He 2 min read HTML DOM lang Property In HTML document, the lang property is used to set or return the value of the lang attribute of an element. This attribute specifies the language code of the element's content. The element attribute takes "en" for English, "ja" for Japanese, "es" for Spanish, and so on. The default value of this att 2 min read HTML DOM KeyboardEvent key Property The keyboardEvent key property in HTML is used to return the value of the key pressed when a key event occurs. It returns a single-character or multi-character string depending on which key is pressed. It is a read-only property. Syntax: event.key Return Value: It returns a string that represents th 1 min read HTML DOM keyboardEvent charCode Property The keyboardEvent charCode property in HTML is used to return the unicode value of a character key pressed during a keypress event. It is a read-only property. The unicode character denotes the number of a character(e.g. the unicode for "A" is 65). Syntax: event.charCode Note: This property has been 1 min read HTML DOM hasChildNodes() Method The HTML hasChildNodes() property will return true if the given node has a child node or false if it doesn't have any child nodes. A blank line or whitespace is also treated as a child node so it also returns true on a blank line or whitespace. Prerequisite DOM (Document Object Model) Parameters: No 2 min read Like