Introduction to Cascading Style Sheets | CSS


What is CSS?

CSS is a cascading style sheets, which is use to design the web pages.

Cascading Style Sheets


There are three ways of inserting a style sheet

1) External style sheet

Follow these steps to use external CSS:-

Step 1

 

Step 2


For example

<html>

<head>

          <title>Teknowize</title>

        <link rel="stylesheet" type="text/css" href="E:/style.css">

</head>

<body>

          <h2> welcome to teknowize</h>

</body>

</html>


Step 3

 

For example

h2

{

    colorred ;

}


Output

css introduction

2) Internal style sheet


Syntax -

<style>  </style>


For example

<html>

<head>

       <style>

           p {

             colorgreen;

              }

           h1 {background-colorredcolor:black;

             }

        </style>

</head>

<body>

            <h1>TEKNOWIZE</h1>

           <p>This is our website<p>

</body>

</html>

 

Output

css introduction


3) Inline style sheet 


Syntax -

style=" css properties here"


For example

<html>

<head>

          <title>Teknowize</title>

</head>

<body>

<h1 style="color:red;background-color:blue;"> Teknowize </h1>

<p>This is our website<p>

</body>

</html>

 

Output

css introduction