introduction CSS
and Selector

introduction CSS and Selector

CSS:- CSS stand for cascading Style Sheet languege and is used to stlyize element written is markup language such as html it saparates the content form the visual representation of the site. the relation between html and css is strongly tied together since. it weite to separate file and the same file html

CSS Selector:- Its the prettren of the element and other terms .it is rule of CSS how to use the that tell the browser which HTML elements should be selected to have the CSS property values inside the rule applied to them.Various lind of selector:-universal selector,probly 70% use the selector

1. universal selector:- universal selector provided by CSS helps in choosing any element within the html page the single element and use s the asterisk (*)symbol is donoting the selector as a universal selector.

        * { 
            background-color: #323232;
            color:#ffff;
        }
    </style>

2.Individual selector:- individual selector provied by CSS to help the address any element but thare is a problem to select hole paragraph

       p {
        background-color: #321123;
       }
    </style>

ID and Class selector:- The CSS ID selector matches an element based on the value of the element's id attribute. In order for the element to be selected, its id attribute must match exactly the value given in the selector.The selector must start a pound sign(#)

 #myname{
        color: #c70d6a;
       }
    </style>

class selector The class selector is a way to select all of the elements with the specified class name, and apply styles to each of the matching elements. The selector must start with a period ( . ) and then the class name. The browser will look for all tags in the page that have a class attribute containing that class name.

       .myname {
        color: #565465;
       }
    </style>

ID is unique in page and only apply to at most element class selector can apply multipal element