mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(curriculum): create tables and forms quiz (#57188)
Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
+140
-100
@@ -17,439 +17,479 @@ To pass the quiz, you must correctly answer at least 17 of the 20 questions belo
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
Which html element allows a two-dimensional table with columns and rows?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`row`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`matrix`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`table` using attributes `r="3" c="4"`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`table`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What elements are used to specify a row and a row header?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
The `r` element is used for rows and the `thead` element is used for the header.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
The `row` element is used for rows and the `th` element is used for the header.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
The `tr` element is used for rows and the `head` element is used for the header.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
The `tr` element is used for rows and the `th` element is used for the header.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What is the `td` element used for?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It is used to define a table data type.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It is used to merge two columns.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It is used to merge two rows.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
It is used to define a table cell.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What's the function of the `colspan` attribute?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It defines the length of a column in a table.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It removes the breakline between text in a column.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It's used to define the number of columns.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
It merges cells across multiple columns.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3">This cell spans across three rows</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
How to make the `td` above span across three rows only?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<td row="3">This cell spans across three rows</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
```html
|
||||
<table>
|
||||
<tr rowspan="3">
|
||||
<td colspan="3">This cell spans across three rows</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It's not possible.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="3">This cell spans across three rows</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What is the purpose of the `thead` element?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It can be used interchangeably with `th`.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It defines a single header cell.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It is essential for marking table headers
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
It groups table header rows.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
Can the `tfoot` element be placed before or after `tbody` element?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
Neither before nor after.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
Only Before.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
Only After.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
Both before and after.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
If the `tfoot` element is written before the `tbody` element then where will it be rendered?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
Before `tbody`.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It will show an error.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
Within the `tbody` element.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
Always at the bottom of the table.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What element is used to define a new cell in a table?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`th`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`tc`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`tcol`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`td`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What defines the cell of a header and improves accessibility?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`colspan`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`style`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`table` with attribute `style = " "`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`scope`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What does the `<input>` tag do?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It allows users to enter any type of data.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It is a pop-up box that asks user to enter data.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It can be only used inside a form to enter user input.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
It defines a single line text field by default.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
Which one of these uses `<input>` inside a form to properly submit data?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
```html
|
||||
<form>
|
||||
<input type="text" name="username" placeholder="Enter your username"></input>
|
||||
<input type="submit" value="Submit"></input>
|
||||
</form>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
```html
|
||||
<form>
|
||||
<input type="text" name="username" placeholder="Enter your username" type="submit" value="Submit">
|
||||
</form>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
All of the other choices are correct.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
```html
|
||||
<form>
|
||||
<input type="text" name="username" placeholder="Enter your username">
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
```
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
Which attribute specifies that an input must be filled out before submitting the form?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`necessary`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`imp`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It is not possible via HTML only.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`required`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
How can you hide an input from the user?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`<hidden></hidden>`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`<input type="text" hidden>`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It is not possible via HTML.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`<input type="hidden" name="inputName" value="inputValue">`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What does the `target` attribute of a form do?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It specifies the variable we intend to change.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It specifies different ways to store the response of the form.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It specifies different keyword searches.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
It indicates where to display the response after submitting the form.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
Which of the following `type` attributes for the `input` element is correct??
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`<input type="search">`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`<input type="range" min="" max="">`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`<input type="email">`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
All of the other choices.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
What does the `action` attribute do?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It works as the `submit` attribute.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
It is used to collect data from the user.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
It defines the next steps to be taken.
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
It defines where the form's response is sent.
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
How can you define the length of an input?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
It is not possible.
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`<input length="15">`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`<input len="15">`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`<input minlength="3" maxlength="15">`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
How can you remove form validation?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`<input type="button" formnovalidate>`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`<button type="button" formnovalidate></button>`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`<input type="text" formnovalidate>`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`<button type="submit" formnovalidate></button>`
|
||||
|
||||
### --question--
|
||||
|
||||
#### --text--
|
||||
|
||||
Placeholder question
|
||||
Which attribute is used to associate a label with an input?
|
||||
|
||||
#### --distractors--
|
||||
|
||||
Placeholder distractor 1
|
||||
`des`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 2
|
||||
`to`
|
||||
|
||||
---
|
||||
|
||||
Placeholder distractor 3
|
||||
`describe`
|
||||
|
||||
#### --answer--
|
||||
|
||||
Placeholder answer
|
||||
`for`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user