javascript

CSS - Introduction

Overview

CSS, also known as Cascading Style Sheets, It is used to style elements in HTML and plays role in Web Development and so its really famous and this is not a programming language but rather a style sheet language, their are very few style sheet languages but some famous ones are SVG, VML, SASS, SCSS. CSS is this famous one of them all as its widely known and CSS has a really simple syntax so that's why people start off with HTML and then CSS as usually JS comes harder when it's the first time and CSS is also is JS so making it usable inside JS, it works with variables and just as same as the HTML-JS integrated in variables. Just like the `<script>` tag, CSS has a `<style>` tag and as same as JS, it has .css file which you can link using the `<link>` tag.

How It Works

In CSS, we select the element we want to style which is something like this `div`, then we have to use 2 curly brackets('{}') which should look something like this:

Div{
}


and inside the curly brackets, we have to put styling properties which style our element, some basic properties are Background-color:;, color:;, Etc

here's an example of how to use it:

div{
  background-color: red;
}


This makes a/the div's background color red.

Common Properties List