HTML Articles - Page 126 of 221

HTML DOM Input Button form Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

143 Views

The HTML DOM input button form property returns the reference of the form which enclose the input button.SyntaxFollowing is the syntax −object.formExampleLet us see an example of input button form property − Live Demo

HTML DOM Input Button disabled Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

168 Views

The HTML DOM input button disabled property returns and alter the value of disabled attribute of an input button in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.disabled2. Modifying nameobject.disabled = true|falseExampleLet us see an example of disabled property − Live Demo HTML DOM disabled Property    body{       text-align:center;    }    .btn{       display:block;       margin:1rem auto;       background-color:#db133a;       color:#fff;       border:1px solid #db133a;       padding:0.5rem;       border-radius:50px;       width:80%;    }    .show-message{       font-weight:bold; ... Read More

HTML DOM Input Button name Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

153 Views

The HTML DOM name property returns and alter the value of name attribute of an input button in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.name2. Modifying nameobject.name=”text”Here, “text” represents the new name of the input button.ExampleLet us see an example of name property − Live Demo HTML DOM name Property    body{       text-align:center;    }    .btn{       display:block;       margin:1rem auto;       background-color:#db133a;       color:#fff;       border:1px solid #db133a;       padding:0.5rem;       border-radius:50px;       width:80%;    }   ... Read More

HTML DOM Input Button value Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

167 Views

The HTML DOM value property returns and modify the content of the value attribute of input button.SyntaxFollowing is the syntax −1. Returning valueobject.value2. Modifying valueobject.value=”text”ExampleLet us see an example of value property Live Demo HTML DOM value Property    body{       text-align:center    }    .btn{       display:block;       margin:1rem auto;       background-color:#db133a;       color:#fff;       border:1px solid #db133a;       padding:0.5rem;       border-radius:50px;       width:80%;    }    .show-value{       font-weight:bold;       font-size:1.4rem;       ... Read More

HTML DOM Input Button type Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

193 Views

The HTML DOM input button type property returns the type of the input button i.e. whether it is of “button”, “submit” or “reset” type.SyntaxFollowing is the syntax −object.typeExampleLet us see an example of input button type property − Live Demo HTML DOM type Property    body{       text-align:center;    }    .btn{       display:block;       margin:1rem auto;       background-color:#db133a;       color:#fff;       border:1px solid #db133a;       padding:0.5rem;       border-radius:50px;       width:40%;    }    .show-type{       font-weight:bold;   ... Read More

HTML DOM paddingLeft Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

118 Views

The HTML DOM paddingLeft property returns and add left padding to an HTML element.SyntaxFollowing is the syntax −1. Returning left paddingobject.style.paddingLeft2. Adding left paddingobject.style.paddingLeft=”value”ValuesHere, “value” can be the following −ValueDetailslengthIt defines value padding in length unit.initialIt defines padding to its default value.inheritIn this padding gets inherited from its parent element.percentage(%)It defines padding in percentage of the width of parent element.ExampleLet us see an example of paddingLeft property − Live Demo HTML DOM paddingLeft property    .outer-box{       background-color:#db133a;       width:300px;       height:300px;       margin:1rem auto;    }   ... Read More

HTML DOM Object type Property

Ankith Reddy
Updated on 30-Jul-2019 22:30:26

185 Views

The HTML DOM Object type Property is used to set or return the value of the type attribute of an object. However, the type attribute is used to set the media type like the object.Following is the syntax to set the type property −obj.type = type_of_mediaAbove, type_of_media is the standard media type, for example, image/bmp, image/tiff, image/tff, etc.Following is the syntax to return the type property −obj.typeLet us now see an example to implement the DOM Object type property −Example Live Demo Display the media type function display() {    var x = document.getElementById("obj").type;     ... Read More

Adding YouTube videos on an HTML web page

George John
Updated on 24-Nov-2023 01:36:49

988 Views

Videos can be easily from YouTube to your web page. You need to just embed the videos. At first, get the Video id − Step1: Go to the Video and right click on it. Select “Stats for nerds” − On clicking, you will get the following dialog box displaying the stats − Above you can see the video id is F6m0ghjadlw. Now, we will embed the same video using its id − Example    Learn WordPress    WordPress Installation    Following is the video demonstrating how to install WordPress on localhost ... Read More

HTML Doctypes

Chandu yadav
Updated on 30-Jul-2019 22:30:26

177 Views

Whenever you create an HTML document, the doctype is the first thing placed in the document.It conveys the web browser about the version of the HTML, this page is written on. It is not casesensitive.Let us see an example displaying DOCTYPE on the top −Example Live Demo Document Title comes here    Demo Heading    This is the demo text. OutputNow let us see some of the declarations for doctype −HTML5 DeclarationExampleHTML 4 StrictThis document type includes all HTML elements except those that have been deprecated, and those that appear in frameset documents.HTML 4 ... Read More

HTML DOM Anchor hash Property

Arjun Thakur
Updated on 30-Jul-2019 22:30:26

191 Views

The HTML DOM Anchor hash property is used to set or return the anchor part of the href attribute value. The part of the URL after the # is what we call the anchor part of a link.Following is the syntax to set the hash property −anchorObject.hash = anchor_partAbove, anchor_part is the anchor part of the URL.Following is the syntax to return the hash property −anchorObject.hashLet us now see an example to implement the DOM Anchor hash property −Example Live Demo Company Our Team Get the anchor part... Display Anchor Part    function display() {     ... Read More

Advertisements