Hosting Solutions
mobile_logo Table of Contents


The class selector will target all elements that are given the specific class name.
Syntax Logic.class_name { property_list }

CSS Code Example

<style> .myclass { background: #BFDFFF; border:#06C 1px solid; padding:10px; } </style> <div class="myclass">Content inside my div...</div> <div>Content inside my div...</div> <p class="myclass">Content inside my paragraph...</p> <p>Content inside my paragraph...</p> Target only div elements with the class name: div.myclass { }



universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang