What is Class Selector in the CSS

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




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 : What is Static initializer Static

    Static initializer: An initializer prefixed with ‘static’ reserved word. The static initializer is stated outside the methods of its enclosing class, and might access only the static fields and methods of its enclosing class.

  • Q : Explain Connection handshake Connection

    Connection handshake: It is the exchange of messages among two processes in an attempt to create a connection between them.

  • Q : Search and Partial Coverage of Java

    Search and Partial Coverage: JPF supports well-known search strategies such as BFS and DFS as well as various heuristic-based searches such as A*, Best-First, and Beam Search. You can sum a number of heuristics during the search, and set search depth

  • Q : What is Cursor Cursor : This is a

    Cursor: This is a visual representation of the existing position of the mouse on the user's virtual desktop. Cursor shapes are frequently set to symbolize the current state of a program – utilizing an hour glass shape to point out that the user

  • Q : Fact table and dimension table describe

    describe the foreign key in fact table and dimension table

  • Q : Syntax to create AJAX objects Write the

    Write the syntax to create the AJAX objects?

  • 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 : Swapping system What action of the

    What action of the swapping system does in case it identifies the illegal page for the swapping?

  • Q : Define Byte Byte : In general

    Byte: In general computing, it refers to eight bits of data. In Java it is as well the name of one of the primitive data types, whose size is of eight bits.

2015 ©TutorsGlobe All rights reserved. TutorsGlobe Rated 4.8/5 based on 34139 reviews.