Input Range min Attribute

Definition and Usage

min Set or return the value of the min attribute of the slider control.

The HTML min attribute specifies the minimum value of the slider control.

Tip:The min attribute is usually used with max attribute Use together to create a valid value range.

Tip:To set or return the value of the max attribute, use max attribute.

See also:

HTML Reference Manual:HTML <input> min Atribute

Example

Example 1

Get the minimum value allowed by the slider control:

var x = document.getElementById("myRange").min;

Try it yourself

Example 2

Change the minimum value:

document.getElementById("myRange").min = "50";

Try it yourself

Syntax

Return min attribute:

rangeObject.min

Set min attribute:

rangeObject.min = number

Attribute Value

Value Description
number Specifies the minimum value allowed for the slider control.

Technical Details

Return Value: String value, indicating the minimum allowed value.

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 10.0 Support Support Support