forms Flashcards
Name the attributes of form in HTML5.
autocomplete and novalidate
Give any three input attributes’ names.
autocomplete autofocus form formaction formenctype formmethod formnovalidate formtarget height and width list min and max multiple pattern (regexp) placeholder required step
Is input attribute “form” supported in IE?
It is not supported in IE.
Which web browsers support the input attribute “autofocus”?
Input attribute “autofocus” is supported by Firefox, Opera and Chrome.
Does Opera support the input attribute “novalidate”?
Starting from version 11, Opera supports the input attribute “novalidate”.
What does autocomplete attribute do?
he autocomplete attribute specifies that the form or input field should have an autocomplete function.
You have a form with multiple fields. You wish to automatically get focus on a field when a page gets loaded. Which field attribute will you use?
The autofocus attribute will be used.
e.g. ‹form›
‹input name=”q” autofocus›
‹input type=”submit” value=”Search”› ‹/form›
Does autofocus attribute work with all input types?
Yes, autofocus attribute works with all input types.
What does form attribute do?
The form attribute is used to specify one or more forms.
Give an example of form attribute.
‹form action=”from1.asp” method=”get” id=”form1”›
First name:‹input type=”text” name=”fname” /› ‹input type=”submit” /›
What does form override attribute do?
Some of the attributes set for the form element can be overridden using override attribute.
Explain the types of override attributes.
a) formaction - overrides the form action attribute
b) formenctype - overrides the form enctype attribute
c) formmethod - overrides the form method attribute
d) formnovalidate - overrides the form novalidate attribute e) formtarget - overrides the form target attribute
What is the main function of the override attribute types?
Override attribute types are helpful for creating different submit buttons.
Which attributes can be used to specify the dimensions of an image used for the input type image?
The height and width attributes specify the height and width of the image used for the input type image.
Give an example of input type image using width and height attributes.
‹input type=”image” src=”img_submit.gif” width=”24” height=”24” /›