- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 8862 Articles for Front End Technology
69 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:
0 Views
The autofocus attribute of the element is used to set the autofocus to the textarea itself when the page loads. The autofocus attribute for the element introduced in HTML5.Following is the syntax −Let us now see an example to implement the autofocus attribute of the element −Example Live Demo Interview Questions Why do you want go for the Technical Writer Job Profile? (100 words) Write the answer in 100 words only... What are your strengths? (50 words) Write the answer in 50 words ... Read More
HTML colspan Attribute
Updated on 29-Jun-2020 08:46:43
531 Views
The colspan attribute of the element in HTML defines the number of columns a cell should span.Following is the syntax −Above, num is the count of columns a cell should span.Let us now see an example to implement the colspan attribute of the element −Example Live Demo
table, th, td {
border: 2px solid blue;
}
Product Expenses
Domains
Cost
Product Development
500000
Marketing
500000
Services
100000
Support
100000
Maintenance
100000
Total Budget = INR 1300000
Output
Updated on 30-Jul-2019 22:30:26
77 Views
The size attribute of the element is used to set the number of visible list items from a drop-down list. A scrollbar would get added if the size is set more than 1.Following is the syntax−Above, num is the count of the visible list items in the drop-down list.Let us now see an example to implement the size attribute of the element−Example Live Demo Candidate Profile Following are the details to be submitted by the candidate: Educational Qualification Graduation BCA B.COM B.TECH B.SC Postgraduation MCA ... Read More
Updated on 30-Jul-2019 22:30:26
332 Views
The required attribute of the element is to let users know that the drop-down is required and need to be submitted before the form is submitted. If you won’t select the value from the drop-down and try to submit the form, it won’t submit and a warning would be visible on the web page itself. The required attribute introduced in HTML5.Following is the syntax−Let us now see an example to implement the required attribute of the element−Example Live Demo Candidate Profile Following are the details to be submitted by the candidate: Educational Qualification Graduation ... Read More
Updated on 30-Jul-2019 22:30:26
84 Views
The HTML DOM Anchor origin property returns the protocol, hostname and port number of the href attribute value, for example, http://www.demo.com:6064 Following is the syntax−anchorObj.originLet us now see an example to implement the DOM Anchor origin property −Example Live Demo
Company
Products
Display href Part
Display origin
Display hreflang
function display() {
var a = document.getElementById("mylink").href;
document.getElementById("myid").innerHTML = a;
}
function display2() {
var a = document.getElementById("mylink").origin;
document.getElementById("myid").innerHTML = a;
}
function display3() {
var a = document.getElementById("mylink").hreflang;
document.getElementById("myid").innerHTML = a;
}
OutputClick on the “Display origin” button−
Updated on 30-Jul-2019 22:30:26
210 Views
The form attribute of the element is used to specify the forms wherein the button belongs to.Following is the syntax −The id above is the if of the form wherein the button belongs to.Let us now see an example to implement the form attribute of the element−Example Live Demo Points Player: Rank: Points: Click to Submit This will produce the following output. The button is part of the form−In the above example, we have set a form and added form elements− ... Read More
Updated on 30-Jul-2019 22:30:26
120 Views
The HTML DOM Anchor href property is used to set or return the href attribute. It returns the url of the link.Following is the syntax to set the anchor href property−anchorObj.href = URLAbove, URL is the url of the link. It can be an absolute, relative or anchor link with a hash.Following is the syntax to return the anchor href property−anchorObj.hrefLet us now see an example to implement the DOM Anchor href property−Example Live Demo Company Our Team Display href Part Display Host Part Display Hostname function display() { var a = document.getElementById("mylink").href; ... Read More
531 Views
The colspan attribute of the element in HTML defines the number of columns a cell should span.Following is the syntax −Above, num is the count of columns a cell should span.Let us now see an example to implement the colspan attribute of the element −Example Live Demo table, th, td { border: 2px solid blue; } Product Expenses Domains Cost Product Development 500000 Marketing 500000 Services 100000 Support 100000 Maintenance 100000 Total Budget = INR 1300000 Output
77 Views
The size attribute of the element is used to set the number of visible list items from a drop-down list. A scrollbar would get added if the size is set more than 1.Following is the syntax−Above, num is the count of the visible list items in the drop-down list.Let us now see an example to implement the size attribute of the element−Example Live Demo Candidate Profile Following are the details to be submitted by the candidate: Educational Qualification Graduation BCA B.COM B.TECH B.SC Postgraduation MCA ... Read More
332 Views
The required attribute of the element is to let users know that the drop-down is required and need to be submitted before the form is submitted. If you won’t select the value from the drop-down and try to submit the form, it won’t submit and a warning would be visible on the web page itself. The required attribute introduced in HTML5.Following is the syntax−Let us now see an example to implement the required attribute of the element−Example Live Demo Candidate Profile Following are the details to be submitted by the candidate: Educational Qualification Graduation ... Read More
84 Views
The HTML DOM Anchor origin property returns the protocol, hostname and port number of the href attribute value, for example, http://www.demo.com:6064 Following is the syntax−anchorObj.originLet us now see an example to implement the DOM Anchor origin property −Example Live Demo Company Products Display href Part Display origin Display hreflang function display() { var a = document.getElementById("mylink").href; document.getElementById("myid").innerHTML = a; } function display2() { var a = document.getElementById("mylink").origin; document.getElementById("myid").innerHTML = a; } function display3() { var a = document.getElementById("mylink").hreflang; document.getElementById("myid").innerHTML = a; } OutputClick on the “Display origin” button−
210 Views
The form attribute of the element is used to specify the forms wherein the button belongs to.Following is the syntax −The id above is the if of the form wherein the button belongs to.Let us now see an example to implement the form attribute of the element−Example Live Demo Points Player: Rank: Points: Click to Submit This will produce the following output. The button is part of the form−In the above example, we have set a form and added form elements− ... Read More
120 Views
The HTML DOM Anchor href property is used to set or return the href attribute. It returns the url of the link.Following is the syntax to set the anchor href property−anchorObj.href = URLAbove, URL is the url of the link. It can be an absolute, relative or anchor link with a hash.Following is the syntax to return the anchor href property−anchorObj.hrefLet us now see an example to implement the DOM Anchor href property−Example Live Demo Company Our Team Display href Part Display Host Part Display Hostname function display() { var a = document.getElementById("mylink").href; ... Read More