Found 10483 Articles for Web Development

HTML DOM Anchor port Property

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

140 Views

The HTML DOM Anchor port property is used to set or return the port of the href attribute.Following is the syntax to set the port property−anchorObj.port = numAbove, num is the port number of the url.Following is the syntax to return the port property−anchorObj.portLet us now see an example to implement the DOM Anchor port property−Example Live Demo Demo heading Services Display pathname Display hreflang Display port function display1() { var a = document.getElementById("mylink").pathname; document.getElementById("myid").innerHTML = a; } function display2() { ... Read More

HTML min Attribute

George John
Updated on 30-Jul-2019 22:30:26

148 Views

The min attribute of the element is used to set the minimum value for . Both min and max are used to set a range of value for input element with type number, date, datetime, range, etc. It introduced in HTML5.Let us now see an example to implement the min attribute of the element. Here, we have set min as 1, therefore a user cannot enter an ID less than 1−Example Live Demo Log in to your account Id: Password: DOB: ... Read More

HTML autofocus Attribute

Chandu yadav
Updated on 29-Jun-2020 08:44:41

113 Views

The autofocus attribute of the element is used to specify which of the would get focus when the web page loads. This attribute introduced in HTML5.Following is the syntax −Let us now see an example to implement the autofocus attribute of the element −Example Live Demo Log in to your account    Id:    Password:    DOB:    Submit OutputIn the above example, we have created a form −    Id:    Password:    DOB:    Submit We have set autofocus to the third input as shown below i.e. DOB, therefore the cursor is visible there itself −DOB:

HTML