Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.54 KB

CSS-Properties.md

File metadata and controls

39 lines (29 loc) · 1.54 KB

CSS Properties

CSS (Cascading Style Sheets) is used to style and layout web pages. Here are some common CSS properties: Visualize the Example

Text Properties

  • color: Sets the color of the text.
  • font-size: Sets the size of the text.
  • font-family: Specifies the font of the text.
  • text-align: Aligns the text (e.g., left, right, center).

Box Model Properties

  • width: Sets the width of an element.
  • height: Sets the height of an element.
  • margin: Sets the space outside the element.
  • padding: Sets the space inside the element, between the content and the border.
  • border: Sets the border around the element.

Background Properties

  • background-color: Sets the background color of an element.
  • background-image: Sets a background image for an element.
  • background-size: Specifies the size of the background image.

Layout Properties

  • display: Specifies the display behavior of an element (e.g., block, inline, flex).
  • position: Specifies the positioning method of an element (e.g., static, relative, absolute, fixed).
  • top, right, bottom, left: Specifies the position of an element.

Other Properties

  • opacity: Sets the opacity level of an element.
  • z-index: Specifies the stack order of an element.

For more detailed information, refer to the MDN Web Docs on CSS.