Forms Flashcards
1
Q
Why might the text area element be used instead of an input element of type text?
A
- a text area element allows for longer paragraphs of text, rather than just single lines
2
Q
What is the purpose of the fieldset element?
A
- a fieldset creates logical groupings of form elements to help the user navigate a form more easily
3
Q
What code sample will create a text input?
A
(input type=”text” name=”username”)
4
Q
Why might you want to use a select element instead of a group of radio buttons, even though they serve the same function?
A
- a select element makes it easier to display lots of options without overwhelming the page
5
Q
What is the purpose of the legend element?
A
- the legend element applies some text to the top of a fieldset
6
Q
What element allows for the creation of groups of options in a select menu?
A
(optgroup)
7
Q
What code sample is a properly labeled input element?
A
(label for=”username”)Username:(/label)(br)
input type=”text” name=”username” id=”username”
8
Q
What code sample will create a submit button?
A
(input type=”submit” name=”Submit”)