Essential CSS
JavaScript Roadmap
Learn JavaScript
Mastering Web Typography
Practical Astro
Understanding Async JS
Unorthodox Tailwind
API Masterclass
Build and Deploy
The Beginner Freelancer
Real World Node
Profile Billing Logout
Essential CSS
Lesson Plan
  1. Introduction
    1. Welcome to Essential CSS
    2. Getting started with the course
    3. What are file formats?
    4. Web standards
    5. What is HTML?
    6. What is CSS?
    7. Devtools, your indispensable best friend
  2. CSS Key Concepts
    1. Some background about CSS
    2. CSS Syntax and Terminology
    3. Selectors
    4. Cascade and Specificity
    5. Origin and Importance
    6. Inheritance
    7. How browsers handle CSS
  3. Basic Mental Model
    1. Everything on the web is a box
    2. The box model
    3. How big is your box?
    4. The relationship between px and em
    5. The `box-sizing` property
    6. The `display` property
    7. Formatting contexts
    8. Block boxes
    9. Inline boxes
    10. What is inline-block?
  4. Flexbox and Grid
    1. The parent-child relationship
    2. Sizing in Flexbox
    3. Flex directions
    4. Basic grid concepts
    5. Setting up a grid
    6. Placing grid items
    7. Box alignment
  5. Building web layouts
    1. Arranging your boxes on the web
    2. Positioning schemes
    3. Floating boxes
  6. Typography
    1. Making your text look good
    2. What is a font?
    3. Typesetting with CSS

Inheritance

0m:54s

Another concept that is important to understand is that some CSS properties can be inherited. This means that setting that property on an element will affect all the child elements within in as well. Whether or not a property can be inherited or not really depends on the nature of the property.

For example, it makes sense for properties like color, which affect the colour of the text within an element or font-family, which determines the font face used by the text within an element, to be inherited. It would be quite annoying to have to explicitly declare the font for every element, especially in the document with lots of content.

On the other hand, properties like width or any of the sizing-related properties are not inherited. If they were, it would also make CSS quite annoying to use. Even though they are a lot of CSS properties out there, you don’t have to memorise how all of them behave. As you continue your web development journey, there will be a number of CSS properties that become second nature to you.