Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Multiple Properties and Comments | Getting Started with CSS
CSS Foundations

bookMultiple Properties and Comments

index.html

index.html

style.css

style.css

copy

When you want to style an element with more than one visual property, you include multiple property-value pairs inside a single rule block. Each property is written on its own line, followed by a colon, the value, and a semicolon. For example, you can set the background-color, color, padding, and border-radius all within the same selector’s curly braces. This makes your CSS concise and easy to read.

To make your stylesheets even clearer, you can add comments within your CSS. Comments are useful for explaining the purpose of a rule or reminding yourself why you chose certain values. In CSS, a comment starts with /* and ends with */. Anything between these markers will be ignored by the browser and will not affect your styles.

question mark

Which of the following is the correct way to write a comment in CSS?

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 2

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Awesome!

Completion rate improved to 6.67

bookMultiple Properties and Comments

Deslize para mostrar o menu

index.html

index.html

style.css

style.css

copy

When you want to style an element with more than one visual property, you include multiple property-value pairs inside a single rule block. Each property is written on its own line, followed by a colon, the value, and a semicolon. For example, you can set the background-color, color, padding, and border-radius all within the same selector’s curly braces. This makes your CSS concise and easy to read.

To make your stylesheets even clearer, you can add comments within your CSS. Comments are useful for explaining the purpose of a rule or reminding yourself why you chose certain values. In CSS, a comment starts with /* and ends with */. Anything between these markers will be ignored by the browser and will not affect your styles.

question mark

Which of the following is the correct way to write a comment in CSS?

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 2
some-alt