πšƒπšžπšπš˜πš›πš’πšŠπš•πšœ π™΄πš‘πšŽπš›πšŒπš’πšœπšŽπšœ π™ΆπšŽπš π™²πšŽπš›πšπš’πšπš’πšŽπš πš‚πšŽπš›πšŸπš’πšŒπšŽπšœ πš‚πš’πšπš— πš„πš™ π™»πš˜πš πš’πš—


Learn CSS

Introduction

CSS is the language we use to style an HTML document.
CSS describes how HTML elements should be displayed.
This tutorial will teach you CSS from basic to advanced.

What is CSS?

CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper, or in other media CSS saves a lot of work. It can control the layout of multiple web pages all at once External stylesheets are stored in CSS files.

A Simple HTML Document

body { background-color: lightblue; }
h1 { color: white; text-align: center; }
p { font-family: verdana; font-size: 20px; }

CSS Syntax

The selector points to the HTML element you want to style.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.
Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.

Example


In this example all <p>elements will be center-aligned ,with a red text color:

p {
color: red;
text-align: center;
}

W3Resources. All rights reserved