> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# `<number>`

APISummary
The `<number>` CSS data type represents a number, being either an integer or a number with a fractional component.

## Examples

### Valid numbers

```css
12          A raw <integer> is also a <number>.
4.01        Positive fraction
-456.8      Negative fraction
0.0         Zero
+0.0        Zero, with a leading +
-0.0        Zero, with a leading -
.60         Fractional number without a leading zero
10e3        Scientific notation
-3.4e-2     Complicated scientific notation
```

### Invalid numbers

```css
12.         Decimal points must be followed by at least one digit.
+-12.2      Only one leading +/- is allowed.
12.1.1      Only one decimal point is allowed.
```

## Compatibility

**Compatibility Table**

**Query:** `css.data-type.number`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/css/data-type/number.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| number | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.5) | Yes (1.5) | Yes |

**`number`**

<code>&lt;number&gt;</code>

**Specifications:**
- [https://drafts.csswg.org/css-values/#number](https://drafts.csswg.org/css-values/#number)

