Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CSS (Cascading Style Sheet): CSS in WHOLESALE:

Demonstrate an example of Falano CSS:


<!DOCTYPE html>
CSS Syntax:
<html>
tag_name
<head>
{
<title>Learning CSS</title>
Property1:Value1;
Property2:Value2;
<style type="text/CSS">
.....
h2
}
{
e.g
color:white;
h2
background-color:red;
{
color:white;
}
background-color:red;
font-family:impact;
</style>
font-size:100;
}
<link type="text/css" href="knaam.css" rel= “stylesheet” >
Internal CSS:
<style>....</style> placed Under <head> Section
</head>
<style type="text/css">
<body>
h2
<h1> Types of CSS </h1>
{
<h2>Internal CSS</h2>
color:white;
<h3>External CSS</h3>
background-color:red;
<h4 style="color:white; background-color:blue;">Inline CSS</h4>
font-size:100;
</body>
}
</html>
</style>

External CSS:
Syntax:
<link type="text/css" href="url" rel="stylesheet">

Inline CSS:
<tag_name style="CSS_Code">Inline CSS</tag_name>

9 Compiled By: Er. Anuk Shakya


Example of Internal CSS: Example of External CSS:
knaam.css
<!DOCTYPE html>
h3
<html>
{
<head>
color:white;
<title>Learning CSS</title>
background-color:green;
<style type="text/CSS">
}
h1
{
color:white;
background-color:red;
font-family:impact; demo.html
font-size:100pt;
} <!DOCTYPE html>
<html>
</style> <head>
<title>Learning CSS</title>
</head>
<body> <link type="text/css" href="knaam.css" rel="stylehseet">
<h1> Example of Internal CSS </h1>
</body> </head>
</html> <body>
<h3> Example of External CSS </h3>

</body>
</html>

10 Compiled By: Er. Anuk Shakya


Example of Inline CSS:
<!DOCTYPE html>
<html>
<head>
<title>Learning CSS</title>
</head>
<body>
<h1 style="color:white; background-color:blue;"> Example of Inline CSS </h1>
</body>
</html>

11 Compiled By: Er. Anuk Shakya

You might also like