CSS Selectors

Types of Selectors

Selectors in CSS are used to target HTML elements on a web page for styling.

  • Type, Class, and ID
  • Attribute selectors
  • Pseudo classes and elements
  • Combinators
    • Decsendent combinator
    • Child combinator
    • Adjacent sibling combinator
    • General sibling combinator

Multiple elements and Selectors

You can group elements that share the same style to reduce lines of codes.

To apply that and create a list of the selectors, you use the comma character to separate the selectors and style them.

CSS Box Model

CSS Box Model Properties- Review

Review of CSS Box Model

Go to Week 5 to review CSS Box Model Properties.

box model properties

Note. From Mozilla Contributors, 2019. CC BY-SA 2.5

The float and Display Properties

The display property used to control how the elements occupy space on a page.

The float property used to create different kinds of layouts by changing the flow of an element.