width Description:
The width property defines the width of the element.
width in CSS Versions:
width Syntax:
width: <length> | <percentage> | auto | inherit
- length
A specific length (include unit of measure). - percentage
A percentage of the width of the parent element. - auto
Allows the user-agent to define the width based on inheritance and pre-set user-agent rules. - inherit
The element should have the same width setting as the parent.
width Initial Value:
auto
width Applies To:
All block-level and replaced elements.
width Inheritance:
This property is not inherited.
width Browser Support:
width Examples:
Standard width property
<p style="width : 500px;">
This paragraph is 500px wide.
</p>
width Special Notes:
- Negative values are not allowed.
- When used for replaced elements, the width will be enforced by scaling the element.
More width Information:

