How many CSS styles
is there?
CSS Styles are 3 types
Inline styles : We
can write styles inside of tag like this
<div style = “color:blue; font-size:14px”> content here</div>
<div style = “color:blue; font-size:14px”> content here</div>
Internal styles : We
can write styles in head tag, between style tag, and we will use same class in
like multi areas like below
Creating in between
head and style tags
<head>
<style>class1{ color:blue;
font-size:14px ;}</style>
</head>
Using in body area
<div
class=”class1”>content</div>
·
External styles : we will write css styles in
external style sheet, and we will add that style sheet in head or bottom,
Style like this inside of styles.css
file we will write like: .class1{ color:blue;
font-size:14px ;}
We will add that style sheet in header like this:
<head>
<link rel=”stylesheet” href=”styles.css” />
</head>
<head>
<link rel=”stylesheet” href=”styles.css” />
</head>
Use CSS class like below:
<div class=”class1”>content</div>
<div class=”class1”>content</div>