Skip to content

Commit 3342bf1

Browse files
Form Basics: Fix headings (#29987)
Use consistent pluralisation Note boxes now also require headings as per style guide update
1 parent a1ee4e1 commit 3342bf1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

intermediate_html_css/forms/form_basics.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ To create a submit button, we use the button element with a `type` attribute of
369369
<button type="submit">Submit</button>
370370
```
371371

372-
#### Reset button
372+
#### Reset buttons
373373

374374
A reset button clears all the data the user has entered into the form and sets all the inputs in the form back to what they were initially.
375375

@@ -379,7 +379,7 @@ To create a reset button, we use the button element with a `type` attribute of "
379379
<button type="reset">Reset</button>
380380
```
381381

382-
#### Generic button
382+
#### Generic buttons
383383

384384
The third and final button type is a generic button that can be used for anything. It's commonly used with JS for creating interactive UI's.
385385

@@ -391,6 +391,8 @@ To create a generic button, we use the button element with a `type` attribute of
391391

392392
<div class="lesson-note lesson-note--tip" markdown=1>
393393

394+
#### Button type defaults in forms
395+
394396
It is important to remember that a button within a form with the `type` value of submit (which happens to be the default value) will always try to make a new request and submit data back to the server. Hence, for buttons that are used within a form for different purposes other than submitting the data, the `type` attribute should always be specified to avoid unwanted effects of submitting a form.
395397

396398
</div>

0 commit comments

Comments
 (0)