first class of css this includes how to  add css andn various selectors in  css

there are many selectors used in css such as :-

1> Id selectors which is used to select an identity and style them

2> Class selectors which is used to select a class and syle it .

3>element selector its used tos elect an elelement baswd off tag name.

for ex:

id --

     #first {

                 color :red;

}

]class--

  .bgred{

     color :red;

}

we can use various element selectors selectors in one bracket 

h1,h2,h3,div {

color:red;

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <title>css selctors</title>
    <style>
        body{
            background-colorpalegoldenrod;
        }
        
        h1
        {
            colorred;
            
        }

        .thisredh3
        {
            background-colorrosybrown;
            colorblack;
            border:5px solid yellow ;
        }
        *{
            margin90;
            padding50;
        }
       

    </style>
</head>
<body>
    <div>
        <h1>this is the hesding</h1>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus hic perferendis repudiandae architecto ab a pariatur laudantium, modi unde porro, nisi nulla, non illo nesciunt consectetur debitis inventore excepturi sint.</p>
        <h1>Lorem ipsum dolor sit amet consectetur adipisicing elit. Hic, ad?</h1>
        <span class = "thisred"><a href="https://www.google.com/search?q=static+websites&oq=static+websites&aqs=chrome..69i57j0l6j0i10l3.5979j0j9&sourceid=chrome&ie=UTF-8" target="_main">about</a></span>
        <span class = "thisred">menu</span>
        <span class = "thisred">features</span>
        <span class = "thisred">contact us</span>
        <h3>Lorem ipsum dolor sit.</h3>
    </div>
</body>
</html>

Comments