Skip to content

Commit 66c19ee

Browse files
make number formatting consistent
1 parent 5b3ffba commit 66c19ee

File tree

1 file changed

+5
-5
lines changed
  • files/en-us/web/html/attributes/step

1 file changed

+5
-5
lines changed

files/en-us/web/html/attributes/step/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ If `any` is not explicitly set, valid values for the `number`, date/time input t
8080
<input type="number" min="10" step="2" />
8181
```
8282

83-
If `step` is omitted, any integer is valid, but floats like 4.2 are not valid as `step` defaults to 1. For 4.2 to be valid:
83+
If `step` is omitted, any integer is valid but floats like 4.2 are not valid as `step` defaults to 1. For 4.2 to be valid:
8484

8585
- either `step` would have to be set to `any`, 0.1, or 0.2,
86-
- or the `min` value would have to be a number ending in .2, such as `0.2`, `1.2`, or `5.2`.
86+
- or the `min` value would have to be a number ending in .2, such as 0.2, 1.2, or -5.2.
8787

8888
## Examples
8989

9090
### `min` impact on step
9191

92-
The value of `min` defines valid values, even if the `step` attribute is not included. This is because `step` defaults to `1`.
92+
The value of `min` defines valid values, even if the `step` attribute is not included. This is because `step` defaults to 1.
9393

9494
In this example, we add a big red border around invalid inputs:
9595

@@ -99,13 +99,13 @@ input:invalid {
9999
}
100100
```
101101

102-
We then define an input with a minimum value of `1.2` and a step value of `2`:
102+
We then define an input with a minimum value of 1.2 and a step value of 2:
103103

104104
```html
105105
<input id="myNumber" name="myNumber" type="number" step="2" min="1.2" />
106106
```
107107

108-
Valid values include `1.2`, `3.2`, `5.2`, `7.2`, `9.2`, `11.2`, and so on. Only floats with an odd-numbered integer part and a decimal part of `.2` are valid. The number spinner, if present, generates valid float values of `1.2` and greater, in increments of `2`.
108+
Valid values include 1.2, 3.2, 5.2, 7.2, 9.2, 11.2, and so on. Only floats with an odd-numbered integer part and a decimal part of .2 are valid. The number spinner, if present, generates valid float values of 1.2 and greater, in increments of 2.
109109

110110
{{EmbedLiveSample("min_impact_on_step","100%",55)}}
111111

0 commit comments

Comments
 (0)