How can you set background color to red?
Explanation
Changing the default style of an HTML element, can be done with the style attribute.
The HTML style attribute has the following syntax:

<ANYTAGNAME style="property:value"> </ANYTAGNAME>

Tip:

This is an example of inline-style.
But use CSS styling with classes nowdays!


HTML code:

<ANYTAGNAME class="backgroundRed"> </ANYTAGNAME>

CSS classes:
.backgroundRed {
    background-color: red;
}

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з HTML & CSS
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести