Learn HTML

CSS Introduction

CSS Basic Syntax

CSS Selector

CSS Units

CSS Text

CSS Border

CSS Outline

CSS Padding

CSS Margin

CSS Height & Width

CSS Overflow

CSS Resize

CSS Background

CSS Box Sizing

CSS Position

CSS Float

CSS Clear

CSS Clip Path & Shape Outside

CSS Display

CSS Media Queries

CSS Pseudo Classes & Elements

CSS Filter

CSS Transition

CSS Transform

CSS Animation

CSS List Style

CSS Table

CSS Scrollbar Styling

CSS Icon

CSS Cursor

CSS Variable & Calc

CSS User Select

CSS Flexbox

Learn Javascript

Learn Django

Introduction about CSS

What is CSS?

CSS stands for Cascading Style Sheets. It is used to design a web page.

Using HTML you can create the structure of a website.
Suppose you want to create a web page. In that page you want to create a menubar, a footer, two images, three social media links. So this is you page structure. To create this structure you will use HTML. But using the HTML you can't decorate your web page, like giving color, setting position, animation, border, alignment, make the page responsive, etc. To do these kind of things you have to use CSS.

For example, you want to write a paragraph on your web page. Now using <p> tag you can create a section for text and can write text. But if you want to set that text in a particular position of your page or if you want to give color, change fontsize, use background color, use border, then you can't do all these things using HTML. Although HTML has some attributes to do some of these things but they are not enough and can't give you a good output. So if you want to do all these things then you have to use CSS.

Web page using HTML

<!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>

<h1">Welcome to this website</h1>
<p>Thanks for choosing this website. I hope you will learn a lot of things using this website</p>
<a>Click on this link</a>
</body>
</html>

Web page using HTML & CSS

<!DOCTYPE html>
<html>
<head>
<title> </title>
<style>
    #first_heading{
        color:red;
        fontsize:35px;
        position:relative;
        left:20%
    }
    #text{
        color:green;
        fontsize:25px;
        position:relative;
        left:25%
        background-color: blue;
        border: solid 3px yellow;
    }
    .link{
        text-decoration:none;
        font-size:20px;
        color:purple;
    }
</style>
</head>
<body>

<h1 id="first_heading">Welcome to this website</h1>
<p class="text">Thanks for choosing this website. I hope you will learn a lot of things using this website</p>
<a class="link">Click on this link</a>
</body>
</html>

Where to write CSS?

We will use the same code editor that used to write HTML. To create CSS file, normally create a file as like HTML but after the file name use .css extension.

CodersAim is created for learning and training a self learner to become a professional from beginner. While using CodersAim, you agree to have read and accepted our terms of use, privacy policy, Contact Us

© Copyright All rights reserved www.CodersAim.com. Developed by CodersAim.