Found 2416 Articles for HTML

HTML DOM Bdo dir Property

AmitDiwan
Updated on 06-Aug-2019 14:13:53

86 Views

The HTML DOM Bdo dir property is associated with the HTML element. Here, bdo stands for Bi-Directional Override. The tag is used to override the current text direction which is by default left to right. The bdo dir property sets or returns the dir attribute value of a element. The dir property is compulsory for the element. It specifies the direction of the text flow.SyntaxFollowing is the syntax for −Setting the dir property −bdoObject.dir = "ltr|rtl"Here, ltr is left-to-right text direction, whereas rtl is right-to-left text direction.Returning the dir property −bdoObject.dirExampleLet us see an example for HTML ... Read More

HTML DOM baseURI Property

AmitDiwan
Updated on 06-Aug-2019 14:26:15

137 Views

The HTML DOM baseURI property returns the base Uniform Resource Identifier (URI) of the document. The property is read-only. The return type is a string value that represents the base URI of the given page.SyntaxFollowing is the syntax for baseURI Property −node.baseURIExampleLet us see an example of the HTML DOM baseURI Property − Click the button below to see the base URI of the document BASE URI    function BaseFunction() {       var x = document.baseURI;       document.getElementById("Sample").innerHTML = x;    } OutputThis will produce the following output −On clicking ... Read More

HTML DOM Base target Property

AmitDiwan
Updated on 06-Aug-2019 14:25:16

17 Views

The HTML DOM Base target property is associated with the HTML element. It is used to set or return the value of the target attribute of the element. The target attribute is used to specify where the hyperlink will open. It can open in the page itself or in a new page.PropertiesFollowing are the values for the target properties −Property ValuesDescription_blankTo open link in new window._selfTo open link in the same frame in which it was clicked. It I the default behaviour._parentTo open link in the parent frameset._topTo open link in the fully body of the window.framenameTo open ... Read More

HTML DOM Base object

AmitDiwan
Updated on 06-Aug-2019 14:24:15

101 Views

The HTML DOM Base object is associated with the HTML element. The element is used to specify the base url for all other URLs in the HTML document. There can at most one element in an HTML document. The Base object is used to set or get the href attribute of the element.PropertiesFollowing are the properties of Base object −PropertyDescriptionhrefSets or returns the value of the href attribute in a base elementtargetSets or returns the value of the target attribute in a base elementSyntaxFollowing is the syntax for −Creating the base element −document.createElement ("base")Accessing the base ... Read More

HTML DOM Base href Property

AmitDiwan
Updated on 06-Aug-2019 14:23:30

203 Views

The HTML DOM Base href property is associated with the HTML tag. The tag is used to specify the base URL for all relative URLs in the current HTML document. There can be a maximum of one tag in a HTML document. The Base href Property returns the value of href attribute in the base element.SyntaxFollowing is the syntax for −Setting the href property −baseObject.href = URLHere, URL is the base URL.Returning the href property −baseObject.hrefExampleLet us see an example for Base href Property − IMAGES Click the below button to change ... Read More

HTML DOM Audio Object

AmitDiwan
Updated on 20-Feb-2021 06:25:03

383 Views

The HTML DOM Audio Object represents the HTML element. The audio element newly introduced in HTML 5. Using the audio object we can manipulate the audio element to get information about audioTrack , change to autoplay, etc.PropertiesFollowing are the properties of HTML DOM Audio Object −PropertyDescriptionaudioTracksTo return audioTrackList object containing available audio tracksautoplayTo return or set the audio to start playing automatically.bufferedTo return a TimeRanges object containing all buffered parts of an audio.controllerTo return the MediaController object representing the current media controller of an audio.controlsTo set or return whether the audio should have play/pause control displayed or notcrossOriginTo set ... Read More

HTML DOM attributes Property

AmitDiwan
Updated on 20-Feb-2021 06:26:50

99 Views

The HTML DOM attributes property associated with attributes within a HTML tag returns a collection of a given node’s attributes in the form of an object of type NamedNodeMap. To access these nodes we can use the index numbers. The indexing starts from 0.SyntaxFollowing is the syntax for HTML DOM attributes property −node.attributesExampleLet us see an example of attributes property − Live Demo Click the button the second attribute of the below list ATTR NAME ATTR LENGTH ONE TWO THREE    function attributeFunc() {       var x = document.getElementById("LIST").attributes[2].name;       document.getElementById("SAMPLE").innerHTML ... Read More

HTML DOM Article Object

AmitDiwan
Updated on 20-Feb-2021 06:27:32

61 Views

The HTML DOM Article object represents the HTML element that was introduced in the HTML5. An article is a self-contained area in an HTML document. It is a part of the semantic tags introduced in HTML5.SyntaxFollowing is the syntax for −Creating an article objectvar a = document.createElement("ARTICLE");ExampleLet us see an example of HTML DOM article object − Live Demo ARTICLE HEADING Heading Sample Article Text Click the below button to change article size and color CHANGE ADD    function ChangeArticle() {       var x = document.getElementById("ArticleObj");       x.style.color = "green";   ... Read More

HTML DOM Area Object

AmitDiwan
Updated on 06-Aug-2019 14:20:44

73 Views

The HTML DOM Area Object is associated with the image map in HTML. Area basically represents the clickable area inside the image map.The image object helps us in creating and accessing the element within the object. We can change clickable region inside the map or change the shape etc. of the image map based on the user input. It can also be used to manipulate the link inside the area elementPropertiesFollowing are the properties for Area Object −ValueDescriptionaltTo set or return alt attribute value.coordsTo set or return the cords attributes of an area.hashTo set or return the anchor part ... Read More

HTML DOM appendChild() Method

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

644 Views

The HTML DOM appendChild() method is used to create and add a text node at the end of the list of child nodes. The appendChild() method can also be used to move an element from current position to a new position. Using appendChild() you can add new values to a list and can even add a new paragraph under another paragraph.SyntaxFollowing is the syntax for appendChild() Method −node.appendChild( node )Here, the parameter node is the object that you want to append. It is a compulsory parameter value.ExampleLet us see an example of appendChild() Method − Live Demo Click the ... Read More

Advertisements