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

CSS basic syntax:

Different ways to write css

We can write css code in two ways:
1.Inline
2.External

Inline

In inline technique we can write it two ways:
1.Inside opening and closing of head tag
2.Inside of any opening tag

Inside opening and closing of head tag:
Inside of opening and closing of the head tag, we write style tag and inside style opening and the closing tag we write CSS code.

<!DOCTYPE html>
<html>
<head>
<title> </title>
<!--Writhing css inside opening and closing of head tag-->
<style>
   p {
      color: red;
   }
</style> </head>
<body>

<p>This is a free learning website. </p>

</body>
</html>

Inside of any opening tag:
If we want to write CSS inside a HTML tag then we write style attribute and then equal sign and then we write the
CSS code inside the double quotation. We can write all these things only in the opening tag.

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

<!-- Inline css apply in tag-->
<h2 style="color:red">Welcome</h2>

</body>
</html>

External

In the external technique first, create a CSS file and write CSS code there and then
link that CSS file with the HTML file.

HTML page

<!DOCTYPE html>
<html>
<head>
<title> </title>
<!-- linked external css pase-->
<link rel="stylesheet" type="text/css" href="my_css.css">
</head>
<body>

<!-- Inline css apply in tag--<
<h2 style=color:red<Welcome</h2>

<p>This is a free learning website. </p>

</body>
</html>

CSS page

p{
   color:red;
}

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.