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!
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.
CSS
can be implemented in three distinct ways — Inline, Internal, and External.
Inline CSS allows us to style directly onto HTML elements using the attribute. It's akin to hand-painting each word on a page:
