index.html
style.css
<!-- Click `style.css` to see the CSS. --> <!DOCTYPE html> <html> <head> <title>Class</title> <link href="style.css" rel="stylesheet"> </head> <body> <h1 class="highlight">This heading will be blue</h1> <p>This paragraph will remain black, since it has no class on it.</p> <p>So will this one.</p> <p class="faded">This paragraph will be faded.</p> <p class="highlight faded">This paragraph will be blue and faded, with both classes.</p> </body> </html>
.highlight { color: blue; } .faded { opacity: 33%; }