HTML DOM BDO Object

AmitDiwan
Updated on 20-Feb-2021 06:20:37

146 Views

The HTML DOM Bdo object is associated with the element in HTML. The bdo stands for Bi-Directional Override. It is used for creating and accessing a bdo object. It has only one property “dir”. The text direction by default is left to right but can be overridden with the element. The bdo object represents the element.propertiesFollowing is the bdo object property −PropertyDescriptiondirSets or returns the value of the dir attribute of a elementSyntaxFollowing is the syntax for −Creating a bdo object −var a = document.createElement("BDO");Accessing a bdo object −var a = document.getElementById("demoBdo");ExampleLet us see an example ... Read More

HTML DOM Blockquote Object

AmitDiwan
Updated on 20-Feb-2021 06:19:06

186 Views

The HTML DOM blockquote basically represent the HTML element . The element does not add any quotation marks unlike the tag. We can create and access properties with the help of the blockquote object.SyntaxFollowing is the syntax for −Creating the blockquote object −var x = document.createElement("BLOCKQUOTE");ExampleLet us see an example of the blockquote object −Live Demo Click on the below button to create a blockquote object CREATE    function createBloc() {       var x = document.createElement("BLOCKQUOTE");       var t = document.createTextNode("This is a random block quote.This is some sample text."); ... Read More

HTML DOM Body Property

AmitDiwan
Updated on 20-Feb-2021 06:15:52

151 Views

The HTML DOM body property associated with HTML element is used to set or return property values of the element. It returns the element. It can be used to change content inside the element. This property can overwrite child elements content present inside the element.SyntaxFollowing is the syntax for −Setting the body property −document.body = New_ContentHere, New_Content is the new content for the element.ExampleLet us see an example for the HTML DOM Body property −Live Demo Sample HEADING Click the below button to overwrite child content Overwrite Content A sample paragraph   ... Read More

HTML DOM Button Value Property

AmitDiwan
Updated on 20-Feb-2021 06:12:07

255 Views

The HTML DOM Button value property is associated with value attribute of the element. It specifies the hidden value of the button. The value property sets or returns the value of the value attribute of a button. Browsers generally submit the value text when clicked on a button while others submit the text between the element.SyntaxFollowing is the syntax for −Setting the value property −buttonObject.value = textHere, the text property value is the initial value that is given to the button.ExampleLet us see an example of the button value property −Live Demo My Button Click on ... Read More

HTML DOM Canvas Object

AmitDiwan
Updated on 20-Feb-2021 06:09:55

348 Views

The HTML DOM Canvas object is associated with the element introduced in HTML5. The tag is used to draw graphics with the help of JavaScript. The canvas acts as a container for graphics. On canvas, we can draw lines, shapes etc.PropertiesFollowing are the properties for Canvas Object −PropertyDescriptionfillStyleTo set or return the color, gradient or pattern that is used to fill the drawing.strokeStyleTo set or return the color, gradient, or pattern used for strokes.shadowColorTo set or return the color to be used for shadows.shadowBlurTo set or return the blur level of shadows.shadowOffsetXTo set or return the horizontal distance ... Read More

HTML DOM cite Object

AmitDiwan
Updated on 20-Feb-2021 06:01:28

123 Views

The HTML DOM cite object is associated with the HTML element. The element is used to give reference to a cited creative work and title must be included. It can be painting, book, tv show, movies etc.SyntaxFollowing is the syntax for −Creating a cite object −var x = document.createElement("CITE");ExampleLet us see an example of the HTML DOM cite object −Live Demo Click the below button to create a CITE element. CREATE    function createCite() {       var x = document.createElement("CITE");       var t = document.createTextNode("The Starry night.");       ... Read More

HTML DOM Code Object

AmitDiwan
Updated on 20-Feb-2021 05:53:21

153 Views

The HTML DOM Code object is associated with the HTML 5 tag. It is used for marking up a piece of code by surrounding it inside the element. The Code object basically represents element.SyntaxFollowing is the syntax for −Creating a code object −var a = document.createElement("CODE");ExampleLet us see an example for the HTML DOM code object −Live Demo Click the below button to create a CODE element with some text CREATE    function createCode() {       var x = document.createElement("CODE");       var t = document.createTextNode("print('HELLO WORLD')");       x.appendChild(t); ... Read More

HTML DOM Column Object

AmitDiwan
Updated on 20-Feb-2021 05:51:55

133 Views

The HTML DOM Column object is associated with the HTML element. The Column object is used to get or set the properties of element. The tag is used only inside a element.PropertiesFollowing is the property for column object −PropertyDescriptionSpanTo set or return the span attribute value of a column.SyntaxFollowing is the syntax for −Creating a Column object −var a = document.createElement("COL");ExampleLet us see an example for the column object −Live Demo    table, th, td {       border: 1px solid blue;    }    #Col1{       background-color:pink;    } ... Read More

HTML DOM columngroup Object

AmitDiwan
Updated on 20-Feb-2021 05:48:37

124 Views

The HTML DOM ColumnGroup object is associated with the HTML element. The element is used to apply CSS styles to a specific number of columns or all columns. This gives us a greater control on the columns that are present in a table.PropertiesFollowing is the ColumnGroup property −PropertyDescriptionspanSets or returns the value of the span attribute of a column groupSyntaxFollowing is the syntax for −Creating a ColumnGroup object −var x = document.createElement("COLGROUP");ExampleLet us see an example for the ColumnGroup object −Live Demo    table, th, td {       border: 1px solid black;   ... Read More

HTML DOM Console info() Method

AmitDiwan
Updated on 20-Feb-2021 05:46:12

65 Views

The HTML DOM console.info() method is used to write an informational message to the console. This method is useful for debugging and testing purposes. Some browsers e.g: firefox, chrome display a small i icon in blue color for the statements printed using this method.SyntaxFollowing is the syntax for the HTML DOM console.info() method −console.info( message )Here, the message is a required parameter and can be of type string or object. It is displayed in the console.ExampleLet us see an example for the HTML DOM console.info() method −Live Demo console.info() Method Press F12 key to view the message in ... Read More

Advertisements