MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

CSS Tutorials

Selectors In CSS
Previous Home Next

There are three main types of selectors:

  1. type selectors: Type selectors target elements by their element type.
  2. h1 { color: red }
    

     

  3. class selectors: Class selectors allow us to apply the same styles to different elements at once by using the same class attribute value across multiple elements. The class selector selects elements with a specific class attribute. To select elements with a specific class, write a period character, followed by the name of the class:

    CSS

    .hellodelhi { color: green }
    

    HTML

    <div class="hellodelhi">color: green</div>
    <p class="hellodelhi">color: green</p>
    
  4. ID selectors: ID selectors are even more precise than class selectors, as they target only one unique element at a time. The id selector uses the id attribute of an HTML element to select a specific element. An id should be unique within a page, so the id selector is used if you want to select a single, unique element.

    To select an element with a specific id, write a hash character, followed by the id="hellodelhi"of the element.

    #hellodelhi { color: red;} 
    
Previous Home Next