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 : Define the term Trusted applet Define

    Define the term Trusted applet: It is an applet with additional privileges than an ordinary (that is, untrusted) applet.

  • Q : Edit things in Moodle Normal 0 false

    Normal 0 false false

  • Q : What is Boolean expression Boolean

    Boolean expression: It is an expression whose outcome is of type Boolean, that is, gives a value of either true or false. The operators like && and || take Boolean operands and generate a Boolean outcome. The relational operators obtain operan

  • Q : What is an Anonymous array Anonymous

    Anonymous array: It is an array formed without an identifier. The anonymous array is generally formed as an actual argument, for example:// generate an anonymous array of integers.    YearlyRainfall y2k = new YearlyRai

  • Q : Explain the way of validation XHTML

    Explain the way of validation XHTML documents online.

  • Q : What is Stack overflow Stack overflow :

    Stack overflow: Stack overflow takes place whenever too many items are pushed onto a stack with a finite or limited capacity.

  • Q : Windows Communication Foundation or WCF

    Why did Microsoft develop the Windows Communication Foundation (WCF) technology?

  • Q : What is High level programming language

    High level programming language: Languages like Ada, Java, C++, and so on which give programmers with features like control structures, classes, methods, packages, and so forth. Such features are mostly independent of any specific instruction set, and

  • Q : What is Append mode Append mode : It is

    Append mode: It is a file writing mode, in which the existing contents of a file are maintained whenever the file is opened. Novel contents are appended to the existing.

  • Q : Explain Look-and-feel Look-and-feel :

    Look-and-feel: The visual impression and interaction style given by a user interface. This is mainly the responsibility of the window manager (that is, in collaboration with the fundamental operating system) running on a specific computer. This refers

©TutorsGlobe All rights reserved 2022-2023.