7 HOURS CSS by APNA COLLEGE

·

1 min read

PRIMARY COLOR

Asterisk = *

Ampersand=&

{} = Curly Bracses

If you use the universal selector, like asterisk * and curly braces together. it will apply all over the pages.

*{
    Color:pink;
}

Selectors:

*Universal selectors

Element Selector meanings you may use particular selectors like h1 h2 or button etc

ID selector means you have to select a particular unique name that you may define in your HTML boilerplate.

<body>
    <h1 id="heading1">  This is heading </h1>
    <h1 id="heading2">  This is heading </h1>
    <h1 id="heading3">  This is heading </h1>
#heading1{
color: blue;
}

#heading2{
    color:red;
}

#heading3{
    color: green;
}

.class meaning you may select multiple elements in same class

    <h1 class="myclass">  This is heading </h1>
    <p class="myclass">   This is simple and normal paragraph</p
.myclass{
    color: gold;
}