Att Input Min
## HTML `` `min` Attribute
The `min` attribute specifies the minimum value allowed for an `` element.
When used in conjunction with the `max` attribute, it allows developers to easily define a range of valid values for user input.
---
## Syntax
```html
```
### Attribute Values
| Value | Description |
| :--- | :--- |
| `number` | A numeric value. Specifies the minimum number allowed in the input field. |
| `date` | A date string (typically in `YYYY-MM-DD` format). Specifies the minimum date allowed in the input field. |
---
## Supported Input Types
The `min` attribute is not applicable to all input types. It can only be used with the following HTML5 `` types:
* `number`
* `range`
* `date`
* `datetime-local`
* `month`
* `time`
* `week`
---
## Code Examples
### Example 1: Date and Numeric Range Constraints
The following example demonstrates how to restrict date selections and numeric inputs using the `min` and `max` attributes.
```html
```
---
## Browser Compatibility and Considerations
* **HTML5 Standard:** The `min` attribute is a feature introduced in HTML5. It is not supported in HTML 4.01 or XHTML.
* **Modern Browsers:** All modern web browsers (including Chrome, Edge, Firefox, Safari, and Opera) fully support the `min` attribute for standard input types like `number` and `range`.
* **Legacy Browser Behavior:** Legacy browsers (such as Internet Explorer 9 and earlier) do not support the `min` attribute. Additionally, older versions of Internet Explorer do not support date/time input pickers, meaning the `min` attribute will not enforce date restrictions natively on those platforms.
* **Validation Note:** Client-side validation using the `min` attribute improves user experience by providing immediate feedback. However, it should always be paired with server-side validation, as client-side constraints can be bypassed by malicious users.
YouTip