top of page

Changing Font Color & Background

Since Mars is a Red Planet, I want to change the background of the Heading to Red. And I want the font color to be white.

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

Step 1 - Adding an ID (you can add class instead of ID) to H1

<h1 ID="Firstheading">Mars Calling. Get Your Tickets Now!</h1>

The ID is Firstheading

Let's create CSS style instruction inside the header -



img.hero {

width:100%; height:auto



#Firstheading {

background-color: crimson;

color: white;




Notice that  in case of ID, we are using # to identify it. In case of Class we are using dot.

There is a difference between ID and Class -

bottom of page