CSS - Cor
Fundo
<!-- index.html -->
<!-- Head starts -->
<style>
.silver-background {
background-color: silver;
}
.square {
width: 200px;
height: 200px;
}
</style>
<!-- Style block end -->
<!-- Head ends -->
<!-- Body starts -->
<div class="silver-background square"></div>
<!-- Body ends -->
Sobrescrever
<!-- index.html -->
<!-- Head starts -->
<style>
.blue-text {
color: blue;
}
.red-text {
color: red;
}
.orange-text {
color: orange;
}
</style>
<!-- Style block end -->
<!-- Head ends -->
<!-- Body starts -->
<p class="blue-text">Blue</p>
<p class="blue-text red-text">Blue</p>
<p class="blue-text red-text orange-text">Orange</p>
<!-- Body ends -->
RGB
<!-- index.html -->
<!-- Head starts -->
<style>
.rgb-background {
background-color: rgb(0, 0, 0);
}
.square {
width: 200px;
height: 200px;
}
</style>
<!-- Style block end -->
<!-- Head ends -->
<!-- Body starts -->
<div class="rgb-background square"></div>
<!-- Body ends -->