Title

In unit 2.3, we defined a CSS selector as the portion of the CSS rule that tells the browser on which HTML element to apply the defined style. Click Here!

In Module 3, we'll discuss a variety of ways to use selectors to attach to specific HTML elements. In unit 2.2, we briefly mentioned the fact that properties apply to the entire hierarchy of HTML elements to which they are attached. This means that you will have to be very careful which selectors you choose to use in combination with your chosen style
Check this out It is possible to independently target every HTML element on the page using selectors, but for this module we are going to stick to basics and only use selectors that match the HTML tag name. For example, here are some example selectors we'll use in this module:

  1. This would affect the style of all link tags on the page
  2. This would affect the style of all paragraph tags on the page
  3. and the style of elements contained within the paragraph tag
  4. This would apply style to the body tag
  5. as well as allow the elements inside the body tag to inherit certain styles applied here.