W3Cx: CSS Basics

Some links and notes from the W3Cx CSS Basics course.

Some links and notes from the W3Cx CSS Basics course offered for free and paid certificate.

Links

CSS

HTML

Module 2: Building CSS rules Notes

  • HTML elements inherit stylistic properties. Not every property is inherited, but many are. The CSS specification tell you, for each property, whether it is inheritable. It's a good idea to keep in mind the structure of your HTML document when choosing your selectors so you can use inheritance to your advantage by applying styles to the top most element and save yourself extra CSS code.
  • True or False? "background-color" is inherited from parent to child HTML element (if the parent is not a body element). False. Explanation: "background-color" is not inherited, but note that the background of elements is normally transparent so you see the background of the parent behind them.
  • When two vertical margins meet, what happens? Explanation: When two vertical margins meet, they "collapse": the smaller one disappears inside the larger one. The right answer is : the space between the two elements is the larger of the two margins.

Module 3: Specific HTML element targeting with CSS selectors

In this module, we're going to talk about classes and IDs, pseudo-classes, contextual selectors, and then how you combine all these selectors together and understand the Cascading part of Cascading style sheets.

Learning to properly select your HTML elements through CSS is crucially important to making sure that you get the most out of CSS.

Tags:


← Previous On The Cruelty is the Point Printer’s Devils Next →