Course Content
Introduction
Introduction to CSS course
0/1
CSS Syntax
0/1
CSS Selectors
0/1
CSS Unit of Measurements
CSS units are used to specify measurements for various properties such as length, width, margin, padding, font size, and more.
0/1
CSS Colors
CSS provides various ways to specify colors.
0/2
CSS Properties And Values
0/1
CSS Background
0/1
CSS Box Model
0/1
CSS Display
CSS display property is used to control how an element is displayed on the webpage.
0/3
Typography and Font Properties
0/1
CSS Display And Positioning
0/2
Responsive Design with CSS Media Queries
0/1
About Lesson

CSS Properties and Values Tutorial

In CSS, properties are used to specify the visual styles and behaviors of elements on a webpage. Each property has a corresponding value that determines the specific characteristics or settings applied to the element. Let’s explore some commonly used CSS properties and their respective values:

Property Description Values
color Sets the color of the text content. Any valid color value, such as named colors (e.g., “red”, “blue”), hexadecimal values (e.g., “#FF0000”), RGB values (e.g., “rgb(255, 0, 0)”), or HSL values (e.g., “hsl(0, 100%, 50%)”).
font-size Sets the size of the font. Any valid length unit (e.g., “px”, “em”, “rem”), or keywords (e.g., “small”, “medium”, “large”).
background-color Sets the background color of an element. Any valid color value.
border Sets the border properties of an element. Various values to specify border width, style, and color (e.g., “1px solid black”, “3px dashed #888”).
margin Sets the margin space around an element. Various length units to define the margin size (e.g., “10px”, “2rem”, “1em”).
padding Sets the padding space inside an element. Various length units to define the padding size (e.g., “10px”, “2rem”, “1em”).
display Defines how an element is displayed on the page. Values like “block”, “inline”, “inline-block”, “flex”, “grid”, and more.
position Sets the positioning scheme for an element. Values like “static”, “relative”, “absolute”, “fixed”, and “sticky”.
width Sets the width of an element. Any valid length unit or percentage value (e.g., “px”, “em”, “%”).
height Sets the height of an element. Any valid length unit or percentage value (e.g., “px”, “em”, “%”).

These are just a few examples of CSS properties and their respective values. CSS offers a wide range of properties that can be combined to achieve various visual effects and layout designs for your webpages. Experiment with different properties and values to customize and style your elements according to your desired look and feel.

Remember to always refer to official CSS documentation and resources for detailed information and examples on specific properties and their values.