What is Class Selector in the CSS

Explain what is meant by the Class Selector in the CSS?

E

Expert

Verified

Class selector chooses all the HTML tags that matches the class name described within the tag attribute of class="class_name". Class selectors are specified with leading dot such as (.class_name). For example, following

CSS definition utilizes the class selector:

/* set text to italic to all tags with class="quote" */
.quote {font-style: italic}

In case, you apply above CSS definition to the following given HTML document, you will obtain two blocks in the italic, one from the <p> tag and one from the <pre> tag:

<p>Normal paragraph...</p>
<p class="quote">Special paragraph...</p>
<pre>Normal pre-formatted text...
<pre class="quote">Special pre-formatted text...</pre>

   Related Questions in Programming Languages

  • Q : Describe Method Method : The portion of

    Method: The portion of a class definition which implements some of the behavior of objects of the class. The body of the method includes declarations of local variables and statements to execute the behavior. The method receives input through its argu

  • Q : Explain State State : The objects are

    State: The objects are said to possess state. The present state of an object is symbolized by the joint values of its attributes. Protecting the state of an object from unsuitable inspection or modification is a significant aspect of class design and

  • Q : What is SLAM SLAM is a Microsoft

    SLAM is a Microsoft project that blurs the line between static analysis and model checking and deductive reasoning. The main goal of SLAM is to check temporal safety properties of C programs (it actually checks that a program correctly uses the interf

  • Q : Define Deep copy Deep copy : It is a

    Deep copy: It is a copy of an object in which copies of all the object's sub-components are also prepared. The resultant object may, in effect, be a clone of the novel.

  • Q : Explain Imperative programming

    Imperative programming: The style of programming generally related with languages such as FORTRAN, C, Pascal and so forth. Imperative programming is differentiated from functional programming in that the previous is strongly tied to the idea of variab

  • Q : Various controls of ASP.NET AJAX Name

    Name the various controls of ASP.NET AJAX?

  • Q : Explain the differences between HTML

    Explain the differences between HTML and XML?

  • Q : What is UNIX Explain, what is UNIX?

    Explain, what is UNIX?

  • Q : What do you mean by Class variable What

    What do you mean by Class variable: It is a synonym for the static variable.

  • Q : "Const" qualifier for pointers and

    In C++ an arguments to a function can be declared as constant as shown below:

    Discover Q & A

    Leading Solution Library
    Avail More Than 1447437 Solved problems, classrooms assignments, textbook's solutions, for quick Downloads
    No hassle, Instant Access
    Start Discovering

    18,76,764

    1951610
    Asked

    3,689

    Active Tutors

    1447437

    Questions
    Answered

    Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!

    Submit Assignment

    ©TutorsGlobe All rights reserved 2022-2023.