CSS properties are used to style HTML elements and make the website look more attractive and tidy. There are several properties available, each with a specific function.

Color and background properties

The color and background properties are used to define the color of elements, both text and background. Some common properties are:

  • color: sets the text color
  • background-color: sets the background color of the element
  • pacity: sets the opacity of the element

Font properties

Font properties are used to define the appearance of the text. Some common properties are:

  • font-size: sets the font size
  • font-family: defines the font family
  • font-weight: sets the font weight

Layout Properties

Layout properties are used to define the position and size of elements. Some common properties are:

  • display: defines the element's display type
  • position: defines the position of the element
  • width and height: define the width and height of the element

Border properties

Border properties are used to define the border appearance of elements. Some common properties are:

  • border-style: sets the border style
  • border-width: sets the width of the border
  • border-color: sets the border color

Animation properties

Animation properties are used to create transition and animation effects on elements. Some common properties are:

  • transition: defines the transition between element properties
  • animation: defines a custom animation for the element
  • transform: defines a transformation on the element, such as rotation or scaling

These are just some of the available CSS properties. It's important to know each one well and know how to use them to create a website with a professional and attractive appearance.

Now answer the exercise about the content:

_What is the role of color and background properties in CSS?

You are right! Congratulations, now go to the next page

You missed! Try again.

Article image Units of measurement in CSS

Next page of the Free Ebook:

5Units of measurement in CSS

2 minutes

Obtenez votre certificat pour ce cours gratuitement ! en téléchargeant lapplication Cursa et en lisant lebook qui sy trouve. Disponible sur Google Play ou App Store !

Get it on Google Play Get it on App Store

+ 6.5 million
students

Free and Valid
Certificate with QR Code

48 thousand free
exercises

4.8/5 rating in
app stores

Free courses in
video, audio and text