What is a CSS property?
A CSS property is a keyword used to control the appearance and layout of an HTML element. It tells the browser what style to apply, such as color, size, spacing, border, or position.
Example:
h1 {
color: blue;
font-size: 30px;
}
How many CSS properties are there?
There is no fixed number. CSS has more than 500 standard properties, and new properties continue to be introduced in newer CSS specifications.
Common CSS properties
- background
- background-color
- font-size
- font-family
- font-weight
- text-align
- width
- height
- margin
- padding
- border
- border-radius
- display
- position
- top
- left
- right
- bottom
- flex
- grid
- justify-content
- align-items
- overflow
- opacity
- z-index
- box-shadow
- cursor
What does non-standard property mean?
A non-standard property is a property that is not part of the official CSS specification (W3C standard). It is usually created by a browser company for its own browser so it may not work in every browser.
(or)
Non-standard properties are browser-specific CSS properties. They are not official CSS properties so they may work in some browsers but not in others.
Example
- webkit-user-select: none;
- webkit- → Chrome, Safari
- moz- → Firefox
- ms- → Microsoft Edge (older versions)
Top comments (0)