- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHPPhysics
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
HTML Articles - Page 132 of 221
143 Views
The HTML DOM Anchor origin property returns the protocol, hostname and port number of the href attribute value, for example, https://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−
254 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
184 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
158 Views
The tag in HTML is used to mark a text that is no longer relevant. This tag was redefined in HTML5 to display a text that is not accurate.Let’s see an example to implement the element −Example Live Demo Exam Results Result would be announced on 6th June. New date for results are 7th June. OutputIn the above example, we have set a text which is no longer relevant− Result would be announced on 6th June. The usage of would strike the same text as shown in the above output.
152 Views
The q tag in HTML is used to specify a short quotation. The quotation marks get inserted around the text set inside the q tag i.e. the quotation.Following is the attribute −cite: It sets the source url of the quote.Let us now see an example to implement the tag −Example Live Demo Thoughts Warren Buffett quoted, It's better to hang out with people better than you. Pick out associates whose behavior is better than yours and you'll drift in that direction. Bill Gates quoted, Your most unhappy customers are your greatest source ... Read More
175 Views
The cite attribute of the element is used to set the source URL of a quote. The source won’t get displayed on the web page, but it is beneficial for the screen readers.Let us now see an example to implement the cite attribute of the element −Example Live Demo What we want? PETA states, We are the largest animal rights organization in the world, with more than 6.5 million members and supporters worldwide. We need your continued support in order to stop cruelty to animals wherever it occurs. OutputIn the above example, ... Read More
105 Views
Tha max attribute of the tag in HTML is used to set the maximum value in a progress bar.Following is the syntax −Above, num represents the number in floating-point. It displays how much effort the task necessitates.Let us now see an example to implement the max attribute of the element −Example Live Demo Windows Build 10.58.89.1 Downloading and Installing: OutputIn the above example, we have displayed the progress of a task going on using the − We have set the maximum value in the progress bar using the max attribute −max="100"
131 Views
The for attribute of the element sets the relationship between the result of the calculation and the elements used in the calculation.Following is the syntax:Above, id is the element id, which sets a separate list of one or more elements with a space. These elements specify the relationship between the result of the calculation and the elements used in the calculation.Let us now see an example to implement the for attribute of the element:Example Live Demo Result 0 100++ = OutputNow, increase the slider and the result would get displayed:
218 Views
The selected attribute in the element pre-selects an option when the page loads. The same option would be visible.Following is the syntax −Let us now see an example to implement the selected attribute of the element −Example Live Demo Educational Qualification Postgraduation MCA M.COM M.TECH M.Sc OutputIn the above example, we have a to set a drop-down list: MCA M.COM M.TECH M.Sc In that, different options are set with element −MCA M.COM M.TECH M.ScWe have set the default visible option when the page loads using the selected attribute ... Read More