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 : Describe the term Context Switch

    Describe the term Context Switch.

  • Q : Reads a line of text and tests whether

    palindrome.asm -- reads a line of text and tests whether it is a palindrome. ## Register usage: ## $t1 - A. ## $t2 - B. ## $t3 - the character *A. ## $t4 - the character *B. ## $v0 - syscall parameter / return values. ## $a0 - s

  • Q : Problem on COBOL source code errors

    There are many errors in the following COBOL source code. Identify the errors and rewrite the program so that it contains no errors:
    IDENTIFICATION DIVISION   (Full stop required)

  • Q : Define the term Constant Define the

    Define the term Constant: A variable whose value might not be changed. In Java, such are implemented by the final variables.

  • Q : Define the term Runtime error Define

    Define the term Runtime error: It is an error which causes a program to finish whenever it is being run.

  • Q : Explain Synchronized statement

    Synchronized statement: It is a statement in which an object-lock should be obtained for the target object prior to the body of the statement and can be entered. Employed to enclose a critical section in order to save a race hazard.

  • Q : Explain Test Object Model Define the

    Define the terms Test Object Model, Test Object and Run-Time object?

  • Q : Explain Out-of-bounds value

    Out-of-bounds value: It is a redundant value employed to point out that a different action from the norm is needed at some point. The read technique of InputStream returns -1 to point out that the end of a stream has been reached, for illustration, ra

  • Q : ASP.NET Session handling How to set

    How to set Session time out in ASP.NET. I tries changing in config file but still facing issue. Please help..

  • Q : Explain Branch instruction Branch

    Branch instruction: It stores a new instruction address into the program counter. The consequence of this is the next instruction to be fetched will not generally be the one instantly following the branch instruction. Therefore the normal chronologica

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