
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 2202 Articles for HTML

121 Views
The HTML DOM Legend form property returns the reference of enclosing form for Legend tag.SyntaxFollowing is the syntax −Returning reference to the form objectlegendObject.formExampleLet us see an example for Legend form property − Live Demo Legend form form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } Legend-form Examination Week: var divDisplay = document.getElementById("divDisplay"); var legendForm = document.getElementById("legendForm"); function showExamination() { divDisplay.textContent = 'Examinations: '+legendForm.form.id; } OutputThis will produce the following output −Before clicking ‘What exams are in this week?’ button −After checking ‘What exams are in this week?’ button −

224 Views
Input number of elements user want to enters and than input the total value user want to calculate from the given list of elements.Input : N=5 Enter any 5 values : 3 1 6 5 7 Enter sum you want to check : 10 Output : 3 1 6AlgorithmSTART STEP1-> Take values from the user STEP2-> Take the sum a user want to check in the set. STEP3-> For i = 0; i < n; i++ STEP4-> Check If sum - *(ptr+i) >= 0 then, STEP4.1-> sum -= *(ptr+i); STEP4.2-> Print the value of *(ptr+i) END ... Read More

209 Views
The HTML DOM Label Object in HTML represents the element.SyntaxFollowing is the syntax −Creating a elementvar labelObject = document.createElement(“LABEL”)PropertiesHere, “LabelObject” can have the following properties −PropertyDescriptionControlIt returns the control of the labelformIt returns a reference of enclosing form that contains the labelhtmlForIt returns/sets the value of the for attribute of a labelExampleLet us see an example for Label htmlForproperty − Live Demo Label htmlFor form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; ... Read More

199 Views
The HTML DOM Label htmlFor property returns/sets the value of for attribute.SyntaxFollowing is the syntax −Returning value of for attribute −labelObject.htmlForExampleLet us see an example for Label htmlForproperty − Live Demo Label htmlFor form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } Label-htmlFor Current Editor: Label for attribute set as editor two ... Read More

107 Views
The HTML DOM KeyboardEvent Object represents an event when user presses a key on keyboard.PropertiesHere, “KeyboardEvent” can have the following properties and methods −Property/MethodDescriptionaltKeyIt returns whether the "ALT" key was pressed or notcharCodeIt returns the Unicode character code of the keycodeIt returns the code of the keyctrlKeyIt returns whether the "CTRL" key was pressed or notgetModifierState()It returns true if the specified key is activated and false if inactiveisComposingIt returns whether the state of the event is composing or notkeyIt returns the key value of the key represented by the eventkeyCodeIt returns the Unicode character code of the key that triggered ... Read More

103 Views
The HTML DOM KeyboardEvent shiftKey property returns the Boolean value (true/false) corresponding to if shift key was pressed using an event or not.SyntaxFollowing is the syntax −Returning booleanValue −event.shiftKeyExampleLet us see an example for KeyboardEvent shiftKey property − Live Demo KeyboardEvent shiftKey form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } KeyboardEvent-shiftKey Editor: I Dare you ... Read More

109 Views
The HTML DOM KeyboardEvent metaKey property returns the Boolean value (true/false) corresponding to if meta key was pressed using an event or not.SyntaxFollowing is the syntax −Returning booleanValue −event.metaKeyExampleLet us see an example for KeyboardEvent metaKey property − Live Demo KeyboardEvent metaKey form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } KeyboardEvent-metaKey Editor: I Dare you ... Read More

116 Views
The HTML DOM KeyboardEvent loaction property returns the number corresponding to location of key pressed on the keyboard.SyntaxFollowing is the syntax −Returning location of pressed key −event.locationNumbersHere, number returned can be the following −numberDescriptions0It represents almost all values on the keyboard. (every key in the middle section of keyboard, eg: ‘Q’, ’\’, ’spacebar’)1It represents the values on the left-keyboard. (every key in the left section of keyboard, eg: ‘left ctrl’, ’left Shift’, ’left alt’)2It represents the values on the right-keyboard. (every key in the right section of keyboard, eg: ‘right ctrl’, ’right Shift’, ’right alt’)3It represents the values on the ... Read More

81 Views
The KeyboardEvent keyCode property returns the unicode character codes corresponding to character that was pressed using an event.Note − Use key property instead for accurate resultsSyntaxFollowing is the syntax −Returning latest typed character’s keyCode −event.keyCodeExampleLet us see an example for KeyboardEvent keyCode property − Live Demo KeyboardEvent keyCode form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } KeyboardEvent-keyCode ... Read More

93 Views
The KeyboardEvent key property returns the key identifier corresponding to the key pressed using an event.SyntaxFollowing is the syntax −Returning latest typed character’s identifier −event.keyExampleLet us see an example for KeyboardEvent key property − Live Demo KeyboardEvent key form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } KeyboardEvent-key Fill in the blanks: ... Read More