HTML Articles

Found 1,508 articles

HTML DOM Input Email autocomplete Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 213 Views

The HTML DOM Input Email autocomplete property sets/returns whether autocomplete is enabled or disabled. If enabled, it shows previously typed values.SyntaxFollowing is the syntax −Returning value - on/offinputEmailObject.autocompleteSetting autocomplete to valueinputEmailObject.autocomplete = valueValuesHere, “value” can be the following −valueDetailsonIt defines that input has autocomplete enabled, it is also the default.offIt defines that input autocomplete attribute is disabled.ExampleLet us see an example of Input Email autocomplete property − Input Email autocomplete    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: ...

Read More

HTML DOM Input Month readOnly Property

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 172 Views

The HTML DOM input month readOnly property returns and modify whether the input month field is read-only or not in an HTML document.SyntaxFollowing is the syntax −1. Returning readOnlyobject.readOnly2. Modifying readOnlyobject.readOnly = true | falseExample    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%)       center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.1rem;    }    input{       display:block;       width:35%;     ...

Read More

What is nodeValue property in JavaScript HTML DOM?

Vikyath Ram
Vikyath Ram
Updated on 11-Mar-2026 331 Views

The nodeValue property is used to get the node value. You need to specify the node.ExampleYou can try to run the following code to learn how to get nodeValue property.           Get the node value       Demo Button Text                var val = document.getElementsByTagName("BUTTON")[0];          var res = val.childNodes[0].nodeValue;          document.write("Node Value: "+res);          

Read More

How -Infinity is converted to Number in JavaScript?

Monica Mona
Monica Mona
Updated on 11-Mar-2026 261 Views

Use the Number() method in JavaScript to convert to Number. You can try to run the following code to learn how to convert -Infinity Number in JavaScript.Example           Convert -Infinity to Number                var myVal = -Infinity;          document.write("Number : " + Number(myVal));           OutputConvert -Infinity to Number Number : -Infinity

Read More

What will happen when [50,100] is converted to Number in JavaScript?

Sai Subramanyam
Sai Subramanyam
Updated on 11-Mar-2026 158 Views

Use the Number() method in JavaScript to convert to Number. You can try to run the following code to learn how to convert [50, 100] to Number in JavaScript − Example Live Demo Convert [50,100] to Number var myVal = [50,100]; document.write("Number: " + Number(myVal));

Read More

How to preselect a value in a dropdown list of items in HTML forms?

Prabhas
Prabhas
Updated on 11-Mar-2026 6K+ Views

With HTML, you can easily create a simple drop down list of items to get user input in HTML forms. A select box also called drop down box provides an option to list down various options in the form of drop down list.You can also preselect a value in dropdown list of items in HTML forms. For that, add selected in the tag for the value you want to preselect.ExampleYou can try to run the following code to learn how to preselect value in a dropdown list of items works in HTML form −         ...

Read More

How can I display an image inside SVG circle in HTML5?

Anvi Jain
Anvi Jain
Updated on 11-Mar-2026 10K+ Views

To display an image inside SVG circle, use the element and set the clipping path. The element is used to define a clipping path. Image in SVG is set using the element.ExampleYou can try to run the following code to learn how to display an image inside SVG circle in HTML5           HTML5 SVG Image                                                                                              

Read More

How to play sound file in a web-page in the background?

Smita Kapse
Smita Kapse
Updated on 11-Mar-2026 26K+ Views

The HTML element is used to add audio to web page. To play sound file in the background on a web page, use the … element. Also, use the autoplay attribute. This will run music in the background whenever the page loads.Set the width and height in a way the player hides on the web page. The loop attribute is added to specify whether the audio will start over again.You can try to run the following code to play a sound file in a web page in the backgroundExample           HTML background music   ...

Read More

How to use HTML5 localStorage and sessionStorage?

Nancy Den
Nancy Den
Updated on 11-Mar-2026 613 Views

HTML5 introduced two mechanisms, similar to HTTP session cookies, for storing structured data on the client side and to overcome the following drawbacks.Cookies are included with every HTTP request, thereby slowing down your web application by transmitting the same data.Cookies are limited to about 4 KB of data. Not enough to store required data.The two mechanisms for storage are session storage and local storage and they would be used to handle different situations.Session StorageThe Session Storage is designed for scenarios where the user is carrying out a single transaction but could be carrying out multiple transactions in different windows at ...

Read More

How Server-Sent Events Works in HTML5?

Jai Janardhan
Jai Janardhan
Updated on 11-Mar-2026 484 Views

Server-sent events standardize how we stream data from the server to the client. To use Server-Sent Events in a web application, you would need to add an element to the document.The src attribute of element should point to an URL which should provide a persistent HTTP connection that sends a data stream containing the events.The URL would point to a PHP, PERL or any Python script which would take care of sending event data consistently. Following is a simple example of web application which would expect server time.You can try to run the following code to learn how ...

Read More
Showing 1–10 of 1,508 articles
« Prev 1 2 3 4 5 151 Next »
Advertisements