Topic Overview and Introduction

Welcome to CSS (Cascading Style Sheets), a pivotal tool for configuring the aesthetics of a website. In this lesson, we will delve into the basics of CSS and learn how to apply styles to HTML elements. By the end of this exploration, you will be capable of crafting essential styles and applying them to HTML elements using various methods. Let's dive in!

Unveiling the Magic of CSS

CSS lends style to an HTML structure. A CSS rule consists of a selector and a declaration block. In this instance, our aim is to turn an HTML heading blue:

In this snippet, "h1" is the selector, while "color: blue;" is the declaration block.

The Changing Faces of CSS: Inline, Internal and External Stylesheets

CSS can be implemented in three distinct ways — Inline, Internal, and External.

Inline Styling

Inline CSS allows us to style directly onto HTML elements using the attribute. It's akin to hand-painting each word on a page:

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal