How do you set text color using CSS?

Experience Level: Junior
Tags: CSS

Answer

Example
h2 {
    background-color: blue;
}

div {
    background-color: #0000e6
}
Example
#p1 {
    font-family: 10px;
    color: aqua
}
Related CSS job interview questions
CSS for beginners
CSS for beginners

Are you learning CSS? Try our test we designed to help you progress faster.

Test yourself