An authentic blog to share your unique thoughts
We use cookies to understand how you use our site and improve your experience. This includes personalized content and advertising.... Learn more
| Attribute | Description | Example |
|---|---|---|
| color | Sets the text color. | color: blue; |
| background-color | Sets the background color. | background-color: #f2f2f2; |
| font-size | Sets the font size of text. | font-size: 16px; |
| font-family | Sets the font family for text. | font-family: "Arial", sans-serif; |
| font-weight | Sets the font weight (boldness) of text. | font-weight: bold; |
| text-align | Sets the horizontal alignment of text. | text-align: center; |
| text-decoration | Sets the decoration of text (e.g., underline, line-through). | text-decoration: underline; |
| margin | Sets the margin space around an element. | margin: 10px; |
| padding | Sets the padding space inside an element. | padding: 10px; |
| border | Sets the border properties of an element. | border: 1px solid black; |
| width | Sets the width of an element. | width: 200px; |
| height | Sets the height of an element. | height: 100px; |
| display | Sets the display behavior of an element (e.g., block, inline). | display: block; |
| float | Specifies how an element should float. | float: left; |
| position | Sets the positioning method of an element (e.g., relative, absolute). | position: relative; |
| top | Sets the top position of an absolutely positioned element. | top: 10px; |
| right | Sets the right position of an absolutely positioned element. | right: 20px; |
| bottom | Sets the bottom position of an absolutely positioned element. | bottom: 10px; |
| left | Sets the left position of an absolutely positioned element. | left: 20px; |
| background-image | Sets the background image of an element. | background-image: url("image.jpg"); |
| background-size | Sets the size of a background image. | background-size: cover; |
| background-position | Sets the starting position of a background image. | background-position: center; |
| background-repeat | Sets whether and how a background image repeats. | background-repeat: no-repeat; |
| opacity | Sets the opacity level of an element. | opacity: 0.5; |
| box-shadow | Adds a shadow to an element. | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); |
| border-radius | Sets the rounded corners of an element. | border-radius: 10px; |