HTML Introduction to HTML and CSS Getting Familiar with HTML and CSS Welcome to HTML and CSS

KAMRAN IMRANLI
KAMRAN IMRANLI
2,555 Points

How did she related the changes in CSS (specifically background color) to the "header 1"?

At the part of the CSS page, where she changed the color from grey to blue, there were no signs that, it will change specifically the "h1" tag background? Why didn't it changed the background of other tags' too?

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,941 Points

It changes the style for all elements with class = tag. Try adding the class of tag at line 29

<h2 class="tag card-title">Background</h2>

and see what happens. Her paragraph with class = "tag location" was overridden by a rule for location that follows:

.location {
  background-color: #222;
  color: white;
}