Test your skills: Other controls
The aim of this skill test is to assess whether you've understood our Other form controls article.
Note: You can try solutions in the interactive editors on this page or in an online editor such as CodePen, JSFiddle, or Glitch.
If you get stuck, you can reach out to us in one of our communication channels.
Other controls 1
In our first "other controls" assessment, we'll get you to create a multi-line text input.
- Create a basic multi-line text input.
- Associate it semantically with the provided "Comment" label.
- Give the input 35 columns, and 10 rows of space in which to add comments.
- Give the comments a maximum length of 100 characters.
To create the input, update the HTML code in the editor below:
Download the starting point for this task to work in your own editor or in an online editor.
Other controls 2
Now it's time to have a go at implementing a drop-down select menu, to allow a user to pick their favorite food from the choices provided.
- Create your basic select box structure.
- Associate it semantically with the provided "food" label.
- Inside the list, split the choices up into 2 subgroups — "mains" and "snacks".
To create the menu, update the HTML code in the editor below:
Download the starting point for this task to work in your own editor or in an online editor.
Other controls 3
In our final task of this set, we start with much the same list of food choices. However, this time we want to do things differently:
- Create a basic text input that is semantically associated with the provided label.
- Put the food choices into a list that can be associated with a form input.
- Associate the list with your text input, so that when you type characters, any of the list options that match the character sequence are given in a dropdown list as autocomplete suggestions.
To create the input, update the HTML code in the editor below:
Download the starting point for this task to work in your own editor or in an online editor.