Prop Style Order
# HTML DOM Style order Property
[ Style Object](#)
## Example
Set the order of a flex item:
document.getElementById("myRedDIV").style.order = "4";
document.getElementById("myBlueDIV").style.order = "3";
document.getElementById("myGreenDIV").style.order = "1";
document.getElementById("myPinkDIV").style.order = "2";
[Try it yourself Β»](#)
* * *
## Definition and Usage
The order property specifies the order of a flexible item relative to other flexible items in the same container.
**Note:** If the element is not a flex item, the order property has no effect.
* * *
## Browser Support

Firefox, Opera, and Chrome support the order property.
* * *
## Syntax
Get the order property:
_object_.style.order
Set the order property:
_object_.style.order="_number_|initial|inherit"
## Property Values
| Value | Description |
| --- | --- |
| _number_ | Default value is 0. Specifies the order of the flexible item. |
| initial | Sets this property to its default value. Read about _initial_. |
| inherit | Inherits this property from its parent element. Read about _inherit_. |
## Technical Details
| Default value: | 0 |
| --- |
| Return value: | A string, representing the order property of the element. |
| CSS version | CSS3 |
* * *
## Related Articles
CSS Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
HTML DOM STYLE Reference: (#)
YouTip