Professional Documents
Culture Documents
CSS stands for Cascading Style Sheets
CSS Syntax & Selectors
Declaration
<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...
- CSS Colors
- CSS Backgrounds
- CSS Height and Width
- CSS Borders
- CSS Margins
- CSS Padding
- CSS Box Model
- CSS Outline
- CSS Text
- CSS Fonts
- Float