mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): add explanation of name attribute to review pages (#60676)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -23,6 +23,7 @@ dashedName: review-html-tables-and-forms
|
||||
- **`type` attribute**: used to specify the type of input field. Ex. `text`, `email`, `number`, `radio`, `checkbox`, etc.
|
||||
- **`placeholder` attribute**: used to show a hint to the user to show them what to enter in the input field.
|
||||
- **`value` attribute**: used to specify the value of the input. If the input has a `button` type, the `value` attribute can be used to set the button text.
|
||||
- **`name` attribute**: used to assign a name to an input field, which serves as the key when form data is submitted. For radio buttons, giving them the same `name` groups them together, so only one option in the group can be selected at a time.
|
||||
- **`size` attribute**: used to define the number of characters that should be visible as the user types into the input.
|
||||
- **`min` attribute**: can be used with input types such as `number` to specify the minimum value allowed in the input field.
|
||||
- **`max` attribute**: can be used with input types such as `number` to specify the maximum value allowed in the input field.
|
||||
@@ -98,10 +99,10 @@ dashedName: review-html-tables-and-forms
|
||||
<legend>Was this your first time at our hotel?</legend>
|
||||
|
||||
<label for="yes-option">Yes</label>
|
||||
<input id="yes-option" type="radio" name="hotel-stay" />
|
||||
<input id="yes-option" type="radio" name="hotel-stay" value="yes" />
|
||||
|
||||
<label for="no-option">No</label>
|
||||
<input id="no-option" type="radio" name="hotel-stay" />
|
||||
<input id="no-option" type="radio" name="hotel-stay" value="no" />
|
||||
</fieldset>
|
||||
|
||||
<!-- Checkbox group -->
|
||||
|
||||
+3
-2
@@ -114,6 +114,7 @@ Review the concepts below to prepare for the upcoming prep exam.
|
||||
- **`type` attribute**: used to specify the type of input field. Ex. `text`, `email`, `number`, `radio`, `checkbox`, etc.
|
||||
- **`placeholder` attribute**: used to show a hint to the user to show them what to enter in the input field.
|
||||
- **`value` attribute**: used to specify the value of the input. If the input has a `button` type, the `value` attribute can be used to set the button text.
|
||||
- **`name` attribute**: used to assign a name to an input field, which serves as the key when form data is submitted. For radio buttons, giving them the same `name` groups them together, so only one option in the group can be selected at a time.
|
||||
- **`size` attribute**: used to define the number of characters that should be visible as the user types into the input.
|
||||
- **`min` attribute**: can be used with input types such as `number` to specify the minimum value allowed in the input field.
|
||||
- **`max` attribute**: can be used with input types such as `number` to specify the maximum value allowed in the input field.
|
||||
@@ -189,10 +190,10 @@ Review the concepts below to prepare for the upcoming prep exam.
|
||||
<legend>Was this your first time at our hotel?</legend>
|
||||
|
||||
<label for="yes-option">Yes</label>
|
||||
<input id="yes-option" type="radio" name="hotel-stay" />
|
||||
<input id="yes-option" type="radio" name="hotel-stay" value="yes" />
|
||||
|
||||
<label for="no-option">No</label>
|
||||
<input id="no-option" type="radio" name="hotel-stay" />
|
||||
<input id="no-option" type="radio" name="hotel-stay" value="no" />
|
||||
</fieldset>
|
||||
|
||||
<!-- Checkbox group -->
|
||||
|
||||
Reference in New Issue
Block a user