-
No Comments
-
DLA
-
April 1, 2024
CSS properties (sometimes referred to as “elements” colloquially) are the individual styles that can be applied to HTML elements to control their appearance. Here’s a list of some common CSS properties along with their descriptions:
- color:
- Sets the color of the text content.
- background-color:
- Sets the background color of an element.
- font-size:
- Sets the size of the font.
- font-family:
- Specifies the font family for text content.
- font-weight:
- Sets the thickness of characters in a text.
- font-style:
- Specifies the style of the font (normal, italic, or oblique).
- text-decoration:
- Adds decoration to text content, such as underline or line-through.
- text-align:
- Sets the alignment of text content within its container.
- line-height:
- Specifies the height of a line of text.
- letter-spacing:
- Sets the spacing between characters in a text.
- word-spacing:
- Sets the spacing between words in a text.
- padding:
- Sets the padding space between the border and the content of an element.
- margin:
- Sets the margin space outside an element.
- border:
- Sets the border properties of an element (width, style, and color).
- border-radius:
- Sets the radius of the border corners.
- box-shadow:
- Adds a shadow effect to an element’s box.
- display:
- Specifies the type of display box an element generates (block, inline, inline-block, etc.).
- position:
- Specifies the positioning method of an element (static, relative, absolute, fixed).
- top, right, bottom, left:
- Positioning properties used with
position
to specify the placement of an element.
- float:
- Specifies whether an element should float to the left or right.
- clear:
- Specifies whether an element should be moved below floating elements.
- width:
- Sets the width of an element.
- height:
- Sets the height of an element.
- min-width, max-width:
- Specifies the minimum and maximum width of an element.
- min-height, max-height:
- Specifies the minimum and maximum height of an element.
- overflow:
- Specifies how overflowed content should be handled.
- z-index:
- Sets the stack order of an element.
- opacity:
- Specifies the transparency level of an element.
- text-transform:
- Specifies how text should be capitalized (uppercase, lowercase, capitalize, etc.).
- text-overflow:
- Specifies how overflowed text should be displayed when it’s too long to fit in its container.
- white-space:
- Specifies how white space inside an element should be handled.
- cursor:
- Specifies the type of cursor to be displayed when hovering over an element.
- list-style:
- A shorthand property for setting the style, image, and position of list markers.
- list-style-type:
- Sets the style of the list item marker (disc, circle, square, etc.).
- list-style-image:
- Specifies an image as the list item marker.
- list-style-position:
- Sets the position of the list item marker (inside or outside the list item box).
- background-image:
- Specifies one or more background images for an element.
- background-repeat:
- Specifies how a background image should be repeated (repeat, repeat-x, repeat-y, no-repeat).
- background-position:
- Sets the starting position of a background image.
- background-size:
- Specifies the size of a background image.
- background-attachment:
- Specifies whether a background image should scroll with the rest of the content or remain fixed.
- opacity:
- Specifies the transparency level of an element.
- visibility:
- Specifies whether an element should be visible or hidden.
- transform:
- Applies 2D or 3D transformations to an element (rotate, scale, translate, skew, etc.).
- transition:
- A shorthand property for setting transition effects on CSS properties.
- animation:
- A shorthand property for defining CSS animations.
- box-sizing:
- Specifies how the total width and height of an element are calculated.
- outline:
- A shorthand property for setting the outline style, width, and color of an element.
- outline-offset:
- Sets the space between an outline and the border edge of an element.
- user-select:
- Specifies whether text selection should be allowed for an element.