Some Examples:
placeholder
The placeholder attribute provides a hint about the expected data.
Placeholders are displayed as dimmed background text when an input field has no value.
It can be used instead of the JS function nuSetPlaceholder();
Code: Select all
placeholder="Enter a number here"
The spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not.
Browsers have different behavior in how they deal with spellchecking in combination with the the lang attribute. Generally spelling is based on the browser's language, not the language of the document.
The following can be spellchecked:
- Text values in input objects (not password)
- Text in textarea objects
The spell checker must be activated in the browser settings.
How Do I Enable Spell Check for Google Chrome?
- Go to Settings.
- Scroll all the way down and click on Advanced Settings.
- Under Privacy, find out “Use a web service to help resolve spelling errors”.
- Turn on the feature by tapping on the slider. The slider will turn blue when the spelling checker is turned on.
Code: Select all
spellcheck="true"
The accesskey attribute specifies a shortcut key to activate/focus an element. The value must be a single character (a letter or a digit).
Code: Select all
accesskey="l"
data-*
The data-* attribute on an input objects attaches additional data to the input element. To create a custom attribute, replace the * with a lowercase string, such as data-id, data-status, or data-location.
Code: Select all
data-price="$4.99"
Note: The pattern, min, max attributes are currently not validated. You will need a custom JS script to do so.
More information on input attributes:
https://www.dofactory.com/html/input-attributes