You are on page 1of 25

CSS

CSS stands for Cascading Style Sheets
CSS Syntax & Selectors

Declaration

h1 { color: red; font-size:12px; }


Selector Property value Property
value
CSS Selectors

• The element Selector


• The id Selector
• The class Selector
• Grouping Selectors
The element Selector

<style>
p{
font-size: 18px;
color: red;
}
h1{
color: green;
font-size:22px;
}
</style>
<body>
<p> Rean CSS </p>
<h1> Rean Web </h1>
</body>
The id Selector

<style>
#a {
font-size: 18px;
color: red;
}
#b{
color: green;
font-size:22px;
}
</style>
<body>
<p id=“a”> Rean CSS </p>
<h1 id=“b”> Rean Web </h1>
</body>
The class Selector

<style>
.a {
font-size: 18px;
color: red;
}
.b{
color: green;
font-size:22px;
}
</style>
<body>
<p class=“a”> Rean CSS </p>
<h1 class=“b”> Rean Web </h1>
</body>
Grouping Selector

<style>
p, h1, h2 {
font-size: 18px;
color: red;
}
</style>
<body>
<p> Rean CSS </p>
<h1> Rean Web </h1>
<h2> Rean Web </h2>

</body>
CSS How To...

• External style sheet


• Internal style sheet
• Inline style
Rean Web - CSS

- CSS Colors
- CSS Backgrounds
- CSS Height and Width
- CSS Borders
- CSS Margins
- CSS Padding
- CSS Box Model
- CSS Outline
- CSS Text
- CSS Fonts
- Float

Next: google.com , youtube.com


I am developer

You might also like