Link Search Menu Expand Document

Override Class Declarations with Inline Styles

Summary

  • ID attributes can be used to override CSS.

Final Code

<style>
  body {
    background-color: black;
    font-family: monospace;
    color: green;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
  #orange-text {
    color: orange;
  }
</style>
<h1 class="pink-text blue-text" id="orange-text">Hello World!</h1>