Basics of CSS

css html basics of css web developement
Basics of CSS

In this blog we will be going through the basics of CSS, and by the end of this blog you will be able to stylize and create awesome webpages.

What you'll learn

  • What is CSS?
  • Why to use CSS?
  • Applying CSS to HTML
  • Anatomy of CSS code
  • Fonts and Text in CSS
  • Everything about boxes in CSS
  • Positioning and Styling the webpage


  • Basic word processing using any text editor. (VS code recommended)
  • Basic knowledge in HTML

What is CSS?

Cascading Style Sheets also known as CSS is the code that styles web content.

CSS describes how HTML elements are to be displayed on screen, paper, or in other media.

Like HTML, CSS is not a programming language. It's not a markup language either. CSS is a style sheet language. CSS is what we use to selectively style HTML elements. For example, this CSS selects paragraph text, setting the color to blue:

p {
  color: blue;

Why to use CSS?

CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.

CSS saves a lot of work. It can control the layout of multiple web pages all at once.

CSS is used to style the web pages by using different styling features whereas HTML is used only to define the structure of the web page

To understand this better, look at the example below:

Difference between HTML and CSS