Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

(UPI) Chapter 3: Web Design with Cascading Style Sheets (CSS) Course (How To)

via Treehouse

Overview

This course is part of our College Credit Program, designed to help you earn college credit while mastering valuable skills. If you're interested in pursuing college credit, click here to learn more.

CSS (Cascading Style Sheets) is a language used to style HTML elements, enabling web developers to control the layout, appearance, and design of web pages. Through external, embedded, and inline styles, CSS separates content from design, improving website consistency and flexibility.

Key features of CSS include selectors for targeting elements, advanced color specifications (e.g., RGBA, HSL, HSLA), font styling, and advanced techniques like using custom properties for reusable values and theming.

Developer tools and CSS custom properties enhance the workflow by making it easier to inspect and modify styles, ensuring responsive and user-friendly web designs.

Syllabus

Exploring Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS) enhance web design by separating content from visual styling. This allows for consistent formatting, easy updates, and improved usability across websites.

Chevron 9 steps
  • instruction

    Introduction to CSS

  • instruction

    External Style Sheets (Best Practice)

  • instruction

    Multiple Style Sheets

  • instruction

    Embedded Styles (Not Recommended for Large Projects)

  • instruction

    Inline Styles (Avoid if Possible)

  • instruction

    How to Use Basic CSS Selectors to Apply Styles to HTML Elements

  • instruction

    Example HTML and CSS Code Using Selectors

  • instruction

    When and How to Use the Normalize Style Sheet for Browser Compatibility

  • Exploring Cascading Style Sheets (CSS) Quiz

    5 questions

Advanced CSS Color Specifications: RGBA, HSL, and HSLA

CSS offers advanced color options like RGBA, HSL, and HSLA, enabling precise control over color properties such as transparency, hue, saturation, and lightness. These specifications allow for more nuanced and accessible designs, making it easier to create visually appealing and adaptive color schemes.

Chevron 7 steps
  • instruction

    How to Specify Measurements in CSS

  • instruction

    Choosing Between Absolute and Relative Units

  • instruction

    Practical Examples in CSS

  • instruction

    Choosing Units Based on Use Case

  • instruction

    How to Specify Colors in CSS

  • instruction

    Advanced Techniques to Specify Colors in CSS

  • Advanced CSS Color Specifications: RGBA, HSL, and HSLA Quiz

    5 questions

Styling and Formatting Fonts in CSS

In CSS, controlling the font family and font size of text is crucial for achieving a readable and aesthetically pleasing design. The font-family and font-size properties allow you to define the type and size of fonts in a flexible way that adapts to different devices and user preferences. This section explains how to set these properties effectively.

Chevron 9 steps
  • instruction

    Choosing Font Families

  • instruction

    Setting Font Sizes

  • instruction

    Setting Font Properties in the Body Element

  • instruction

    Practical Examples

  • instruction

    Properties for Styling Fonts

  • instruction

    Properties for Text Formatting

  • instruction

    Adding Shadows to Text with CSS

  • instruction

    Floating Images so Text Flows Around Them

  • Styling and Formatting Fonts in CSS Quiz

    5 questions

CSS Selectors to Apply Styles

To apply more specific styling to HTML elements, CSS provides advanced selectors that let you target elements based on their relationships, attributes, and other characteristics. Here’s a closer look at relational selectors, combination selectors, and attribute selectors.

Chevron 6 steps
  • instruction

    Relational Selectors

  • instruction

    Combination Selectors

  • instruction

    Attribute Selectors

  • instruction

    Using Pseudo-Class and Pseudo-Element Selectors in CSS

  • instruction

    Understanding CSS Cascade Rules

  • CSS Selectors to Apply Styles Quiz

    5 questions

Creating a Styled Web Page with CSS and HTML

This section outlines how to structure a web page using HTML and CSS for various formatting and styling needs, such as applying colors, text shadows, and positioning elements. We’ll look at the HTML structure and the accompanying CSS file that styles the page.

Chevron 2 steps
  • instruction

    HTML Structure for the Web Page

  • Creating a Styled Web Page with CSS and HTML Quiz

    5 questions

Using Developer Tools and Custom CSS Properties

This stage covers the use of browser developer tools for inspecting and debugging CSS, along with the implementation of CSS custom properties (variables). Developer tools allow real-time inspection and modification of HTML and CSS, while custom properties enable reusable, maintainable, and flexible styling across a webpage, including global and scoped variables for easier management and theming.

Chevron 5 steps
  • instruction

    Using Developer Tools to Inspect CSS Styles

  • instruction

    Using CSS Custom Properties (CSS Variables)

  • instruction

    Creating and Using CSS Custom Properties (CSS Variables)

  • instruction

    Using Custom Properties Locally

  • Using Developer Tools and Custom CSS Properties Quiz

    5 questions

Reviews

Start your review of (UPI) Chapter 3: Web Design with Cascading Style Sheets (CSS) Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.