- 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 2417 Articles for HTML
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
177 Views
The value attribute of the element is used to set the value of the list item. Since the value is a number, it would be set only for the ol element in HTML i.e. the ordered list.Following is the syntax −Above, num is the value of the list item in an ordered list. Let us now see an example to implement the value attribute of the element −Example Live Demo Subjects Following are the subjects − Maths Science English French Remaining subjects − Coffee Accounts Programming Networking ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
172 Views
The width attribute of the element is only used with image and allows you to set the width of the image added using −The width attribute introduced in HTML5 and acts as the submit button. Following is the syntax −Above, width represents the width in pixels.Let us now see an example to implement the width attribute of the element wherein the width is set for input type image −Example Live Demo Register Id − Password − DOB − Telephone − Email − ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
283 Views
The size attribute of the element is used to set the width of the input. The more the width would lead to a textbox with more width. You can set the size attribute for the following input types − text, search, email, password, tel and url.Following is the syntax −Above, size_num is the width of the input you need to set in numbers. The default is 20.Let us now see an example to implement the size attribute of the element −Example Live Demo Register Id − Password − ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
320 Views
The strokeRect() method of the HTML canvas is used to create a rectangle on a web page. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −context.strokeRect(p, q, width, height);Above, p − The x-coordinate of the upper-left corner of the rectangleq − The y-coordinate of the upper-left corner of the rectanglewidth − Width of the rectangleheight − Height of the rectangleLet us now see an example to implement the strokeStyle property of canvas ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
132 Views
The download attribute of the element is used to set the name of the file to be downloaded which would download when user clicks on the hyperlink.Following is the syntax −The file is the name of the file set for download.Let us now see an example to implement the download attribute of the element −Example Live Demo Learning Learn these technologies with ease.... OutputNow, when you will click on let’s say “PERL”, the file will download as shown below −Above, we ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
22 Views
The autofocus attribute of the element in HTML is used to set focus to a drop-down list when the page loads.Following is the syntax −Let us now see an example to implement the autofocus attribute of the element −Example Live Demo Profile Educational Qualification Graduation BCA B.COM B.TECH Postgraduation MCA M.COM M.TECH M.Sc Worked at ABC Corporation from July 2015 - May 2019 as a Technical Manager. ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
62 Views
The HTML DOM Anchor pathname property is used to set or return the path name of the href attribute.Following is the syntax to set the pathname property −anchorObj.pathname = pathAbove, path is the pathname of the URL.Following is the syntax to return the pathname property −anchorObj.pathnameLet us now see an example to implement the DOM Anchor pathname property −Example Live Demo Company Products Display pathname Display hreflang function display1() { var a = document.getElementById("mylink").pathname; document.getElementById("myid").innerHTML = a; } ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
202 Views
The alt attribute of element is used to set an alternate text for an area. This alternate text i.e. alt is visible when the image isn’t displayed for reasons like internet, loading issues, errors, etc.Following is the syntax −Here, text is the alt text to be set.Let us now see an example to implement the alt attribute of the element −Example Live Demo Learning Learn these technologies with ease.... OutputIn the above example, we have set the map on the following ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
595 Views
The target attribute of the element is used to set where the linked document will open. You can set the document to open in a new window, same frame, parent frame, etc.Following is the syntax −Here, _blank is used to open the linked document in new window or tab, _self opens the linked document in the same frame as it was clicked, _parent opens the document in the parent frame, _top opens the linked document in the entire body of the window, frame opens the linked document in a named frame.Let us now see an example to implement target attribute ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
83 Views
The HTML DOM Anchor password property set or return the password part of the href attribute value. The password part is entered by the user. If you want to display it, then it can be seen after the username and before the hostname i.e. https −//username −password@www.demo.com.Following is the syntax to set the password property −anchorObj.password = passwordFollowing is the syntax to return the password property −anchorObj.passwordLet us now see an example to implement the DOM Anchor password property −Example Live Demo Company Products Display password Display origin Display hreflang function display() { ... Read More