Free Ebook cover Complete CSS course

Complete CSS course

4.5

(2)

35 pages

CSS properties

Capítulo 4

Estimated reading time: 2 minutes

+ Exercise
Audio Icon

Listen in audio

0:00 / 0:00

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:

Continue in our app.

You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.

Or continue reading below...
Download App

Download the app

  • 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.

The role of color and background properties in CSS is to set the color of elements, both text and background. The color property is used for text color, while background-color is used for the background color of the element. This explanation is supported by the text.

Next chapter

Units of measurement in CSS

Arrow Right Icon
Download the app to earn free Certification and listen to the courses in the background, even with the screen off.