-5

As the title suggests, I want to know the meaning of a and h1 in '#main-navigation h1 a'. Here is the code:

#main-navigation {
  ...
}

#main-navigation a {     
  ...
}

#main-navigation a:hover,
#main-navigation a:active {
  color: #cf79f1;
}

#main-navigation h1 a:hover,
#main-navigation h1 a:active {
  color: white;
}
caterNaf
  • 13
  • 3

2 Answers2

0

a tag is for URL linking and stuff.

h1 tag represent heading

More here:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Amir Naeem
  • 570
  • 6
  • 23
0

The space between tags in CSS mean whatever is after the space is a child of the previous element. Example:

#main-navigation a

means: apply following styles to all a elements within #main-navigation

Jan Myszkier
  • 2,714
  • 1
  • 16
  • 23