Organization Flashcards

1
Q

label element

A
  • helps to organize forms by assigning some helpful text to a form control
  • this text helps the user to understand what kind of data they should add to each form field
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

for attribute

A

tied with the label element, it associates with a particular form element by matching id attribute values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • Create a label with a for attribute that matches the input element’s ID. Between the label tags, write the text “Name:”.
  • Create a label for the email field with the text “Email:”.
  • Create a label for the textarea element, and give it the text “Comment:”.

(form action=”index.html” method=”post”)
(input type=”text” id=”name” name=”user_name” /)
(input type=”email” id=”email” name=”user_email” /)
(textarea id=”comment” name=”user_comment”)(/textarea)
(button type=”submit”)Submit Comment(/button)
(/form)

A

(label for=”name”)Name:(/label)

(label for=”email”)Email:(/label)

(label for=”comment”)Comment:(/label)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

fieldset element

A
  • wraps multiple form elements into common groups
  • this can help organize a form and make it easier to understand for users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

legend element

A
  • similar to the label element, but instead of labeling a form control, it labels a fieldset
  • adding a legend to a fieldset can provide some helpful context for users that are filling out a form
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • Create a fieldset element that wraps the name and email fields.
  • Add a legend element to the fieldset and give it the text “Tell us about yourself.”
  • Create another fieldset element that wraps the comment field.
  • Add another legend element to the fieldset and give it the text “What’s on your mind?”

(form action=”index.html” method=”post”)
(label for=”name”)Name:(/label)
(input type=”text” id=”name” name=”user_name” /)
(label for=”email”)Email:(/label)
(input type=”email” id=”email” name=”user_email” /)
(label for=”comment”)Comment:(/label)
(textarea id=”comment” name=”user_comment”)(/textarea)
(button type=”submit”)Submit Comment(/button)
(/form)

A

(form action=”index.html” method=”post”)

(fieldset)

(legend)Tell us about yourself(/legend)
(label for="name")Name:(/label)
(input type="text" id="name" name="user\_name" /)
(label for="email")Email:(/label)
(input type="email" id="email" name="user\_email" /)

(/fieldset)

(fieldset)

(legend)What's on your mind?(/legend)
(label for="comment")Comment:(/label)
(textarea id="comment" name="user\_comment")(/textarea)

(/fieldset)
(button type=”submit”)Submit Comment(/button)
(/form)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly