This is the w3schools CSS Fundamentals course.
CSS is the language we use to style an HTML document.
CSS describes how HTML elements should be displayed.
Student tip
You can use W3schools Spaces, to learn, test, and deploy code. Build your
own website. Get started at www.w3schools.com/spaces
1.1 Introduction to Cascading Style Sheets
CSS is used to define styles for your web pages, including the design, layout and
variations in display for different devices and screen sizes
1.2 CSS syntax A CSS rule-set consists of a
selector and a declaration block
1.3 CSS selectors A CSS rule-set consists
of a selector and a declaration block
1.4 How to add CSS to webpages When a
browser reads a style sheet, it will format the HTML document according to
the information in the style sheet
1.5 CSS comments Comments are used to
explain the code, and may help when you edit the source code at a later date
This module defines what colors are used in the webpage, i.e.
font, background and border colors. It also defines the background of the webpage and
the borders of each HTML element.
Prerequisites: Module 1: Introduction
2.1 CSS colors defines the colors used in
the elements of a webpage
2.1.1
RGB defines colors used by their Red, Green, Blue
and Alpha intensity
2.1.2 HEX defines colors by their Red, Green,
Blue hexadecimal properties
2.1.3 HSL
defines colors by their Hue, Saturation, Lightness and Alpha intensities
2.2 CSS backgrounds defines the background
of the webpage as well as the background of each element in the webpage
This module describes how to format text, add font families and font effects.
It also describes how to add Google remote fonts and Google remote font effects and
remote icons from other providers to your project.
Prerequisites: Module 3: Margins, Padding, Size, Box Model and Outline
This module describes the different options available for
display, max-width as well as
positioning different elements including float and
align the elements. It also describes how
inline and block
elements are displayed.
10.1 CSS Units CSS has several different units
for expressing a length
10.2 CSS Specificity If there are two or
more conflicting CSS rules that point to the same element, the browser follows
some rules to determine which one is most specific and therefore wins out
10.3 CSS Rounded Corners The CSS
border-radius property defines the border radius
of an element's corners
10.4 CSS Border Images The CSS
border-image property allows you to specify an
image to be used instead of the normal border around an element
14.4 CSS Variables The var() function is
used to insert the value of a CSS variable
14.4.1 Overriding Variables
From the previous page we have learned that global variables can be
accessed/used through the entire document, while local variables can
be used only inside the selector where it is declared
Prerequisites: Module 14. Object Fit, Columns, User
Interface and Variables
15.1 CSS Box Sizing The CSS box-sizing property
allows us to include the padding and border in an element's total width and height
15.2 CSS Media Queries The @media rule,
introduced in CSS2, made it possible to define different style rules for
different media types
15.3 CSS MQ Examples Media queries are a
popular technique for delivering a tailored style sheet to different devices
15.4 CSS Flexbox The Flexible Box Layout Module,
makes it easier to design flexible responsive layout structure
15.4.1 CSS Flex
Container The flex container becomes flexible by setting the
display property to flex
15.4.2 CSS Flex Items
The direct child elements of a flex container automatically becomes
flexible (flex) items
15.4.3 CSS Flex
Responsive You learned from the Media Queries chapter that you
can use media queries to create different layouts for different screen
sizes and devices
Prerequisites: Module 15. Box Sizing, Media Queries
and Flexbox
16.1 Grid Intro The CSS Grid Layout Module offers
a grid-based layout system, with rows and columns, making it easier to design web
pages without having to use floats and positioning
16.2 Grid Container To make an HTML element
behave as a grid container, you have to set the display property to grid or
inline-grid
16.3 Grid Item A grid container contains grid
items. By default, a container has one grid item for each column, in each row,
but you can style the grid items so that they will span multiple columns and/or
rows.