mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-10 22:00:43 -04:00
feat(curriculum): add question set 2 for forms and table quiz (#58814)
Co-authored-by: Dario-DC <105294544+Dario-DC@users.noreply.github.com>
This commit is contained in:
@@ -549,3 +549,516 @@ Which of the following attributes is used to specify the value for a button?
|
||||
|
||||
`value`
|
||||
|
||||
## --quiz--
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is the role of the `action` attribute inside of the opening `form` tag?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
It is used to specify that an input field is read-only.
|
||||
|
||||
---
|
||||
|
||||
It is used to define the number of characters that should be visible as the user types into the input.
|
||||
|
||||
---
|
||||
|
||||
It is used to show a hint to the user to show them what to enter in the input field.
|
||||
|
||||
#### --answer--
|
||||
|
||||
It is used to specify the URL where the form data should be sent.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following attributes is used to specify the HTTP method to use when sending the form data?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`set`
|
||||
|
||||
---
|
||||
|
||||
`type`
|
||||
|
||||
---
|
||||
|
||||
`http`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`method`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is a common method used when working with forms?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`PUSH`
|
||||
|
||||
---
|
||||
|
||||
`SET`
|
||||
|
||||
---
|
||||
|
||||
`PULL`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`GET`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is NOT a valid value for the `type` attribute?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`number`
|
||||
|
||||
---
|
||||
|
||||
`email`
|
||||
|
||||
---
|
||||
|
||||
`text`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`http`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is the correct way to create a button in a form?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
```html
|
||||
<form>
|
||||
<input get="button" value="Show Alert" />
|
||||
</form>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<form>
|
||||
<input btn="button" value="Show Alert" />
|
||||
</form>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<form>
|
||||
<input set="button" value="Show Alert" />
|
||||
</form>
|
||||
```
|
||||
|
||||
#### --answer--
|
||||
|
||||
```html
|
||||
<form>
|
||||
<input type="button" value="Show Alert" />
|
||||
</form>
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is implicit form association?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
This is where inputs can be associated with labels by using the `action` and `for` attributes on the `label` element.
|
||||
|
||||
---
|
||||
|
||||
This is where inputs can be associated with labels by using the `required` and `for` attributes on the `label` element.
|
||||
|
||||
---
|
||||
|
||||
This is where inputs can be associated with labels by using the `for` attribute on the `label` element.
|
||||
|
||||
#### --answer--
|
||||
|
||||
This is where inputs can be associated with labels by wrapping the input field inside the `label` element.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is the role of the `fieldset` element?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
It is used to group the header content in an HTML table.
|
||||
|
||||
---
|
||||
|
||||
It is used to create a label for an input field.
|
||||
|
||||
---
|
||||
|
||||
It is used to add a caption to describe the group of inputs.
|
||||
|
||||
#### --answer--
|
||||
|
||||
It is used to group related inputs together.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is used to create a checkbox in a form?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
```html
|
||||
<input check="type" id="location" name="location" value="location" />
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<input type="check" id="location" name="location" value="location" />
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<input checkbox="type" id="location" name="location" value="location" />
|
||||
```
|
||||
|
||||
#### --answer--
|
||||
|
||||
```html
|
||||
<input type="checkbox" id="location" name="location" value="location" />
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following elements is used to add a title for an HTML table?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`titles`
|
||||
|
||||
---
|
||||
|
||||
`title`
|
||||
|
||||
---
|
||||
|
||||
`captions`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`caption`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is the role of the `legend` element?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
It is used to group the body content in an HTML table.
|
||||
|
||||
---
|
||||
|
||||
It is used to add a caption to describe the cells for a table.
|
||||
|
||||
---
|
||||
|
||||
It is used to group related inputs together.
|
||||
|
||||
#### --answer--
|
||||
|
||||
It is used to add a caption to describe the group of inputs.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following elements is used to group the header content in an HTML table?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`header`
|
||||
|
||||
---
|
||||
|
||||
`head`
|
||||
|
||||
---
|
||||
|
||||
`theader`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`thead`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is the correct way to add rows and data cells to a table?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<data>Davis</data>
|
||||
<data>Alex</data>
|
||||
<data>54</data>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<cell>Davis</cell>
|
||||
<cell>Alex</cell>
|
||||
<cell>54</cell>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<table>
|
||||
<row>
|
||||
<td>Davis</td>
|
||||
<td>Alex</td>
|
||||
<td>54</td>
|
||||
</row>
|
||||
</table>
|
||||
```
|
||||
|
||||
#### --answer--
|
||||
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<td>Davis</td>
|
||||
<td>Alex</td>
|
||||
<td>54</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is the DOM inspector?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
A tool that is used to remove all elements from the DOM.
|
||||
|
||||
---
|
||||
|
||||
A set of tools built directly into the browser that helps you debug, profile, and analyze web pages.
|
||||
|
||||
---
|
||||
|
||||
A tool that checks the syntax of HTML code to ensure it is valid.
|
||||
|
||||
#### --answer--
|
||||
|
||||
A tool that allows you to inspect and modify the HTML structure of a web page.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is a tool that checks the syntax of HTML code to ensure it is valid?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
HTML validate
|
||||
|
||||
---
|
||||
|
||||
HTML isValid
|
||||
|
||||
---
|
||||
|
||||
HTML valid
|
||||
|
||||
#### --answer--
|
||||
|
||||
HTML validator
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is the correct way to specify the number of columns for data cell in a table?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
```html
|
||||
<td columns="2">Average Grade</td>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<td col="2">Average Grade</td>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<td column="2">Average Grade</td>
|
||||
```
|
||||
|
||||
#### --answer--
|
||||
|
||||
```html
|
||||
<td colspan="2">Average Grade</td>
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is a focused state for an input field?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
This is the state of an input field when the focus is removed by the user.
|
||||
|
||||
---
|
||||
|
||||
This is the state of an input field when it is set to readonly by the user.
|
||||
|
||||
---
|
||||
|
||||
This is the state of an input field when it is disabled by the user.
|
||||
|
||||
#### --answer--
|
||||
|
||||
This is the state of an input field when it is selected by the user.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following is the correct way to create a radio button?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
```html
|
||||
<input id="no-option" select="radio" name="hotel-stay" />
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<input id="no-option" radio="type" name="hotel-stay" />
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```html
|
||||
<input id="no-option" type="radio-btn" name="hotel-stay" />
|
||||
```
|
||||
|
||||
#### --answer--
|
||||
|
||||
```html
|
||||
<input id="no-option" type="radio" name="hotel-stay" />
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
What is the role of the `for` attribute?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
It is used to show a hint to the user.
|
||||
|
||||
---
|
||||
|
||||
It is used to specify the value of the input
|
||||
|
||||
---
|
||||
|
||||
It is used to create a label for an input field.
|
||||
|
||||
#### --answer--
|
||||
|
||||
It is used to specify which input field the label is for.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following attributes is used to define the number of characters that should be visible as the user types into the input?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`setsize`
|
||||
|
||||
---
|
||||
|
||||
`sizing`
|
||||
|
||||
---
|
||||
|
||||
`sizes`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`size`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Which of the following attributes is used to show a hint to the user to show them what to enter in the input field?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
`showhint`
|
||||
|
||||
---
|
||||
|
||||
`hint`
|
||||
|
||||
---
|
||||
|
||||
`clue`
|
||||
|
||||
#### --answer--
|
||||
|
||||
`placeholder`
|
||||
|
||||
Reference in New Issue
Block a user