Lesson 2: Selectors and Properties

CSS uses selectors to target HTML elements and apply styles. Properties define how the elements should look.

/* Target the <h2> element inside <main> */
main h2 {
    color: #007bff;
    font-size: 24px;
}

/* Target all <a> elements in <nav> */
nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* Target the <footer> element */
footer {
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}