IT Questions and Answers :)

Friday, May 11, 2018

Which of the following characters designates a class in CSS?

Which of the following characters designates a class in CSS?

  • #
  • !
  • .

 
 Which of the following characters designates a class in CSS?

EXPLANATION

The .class selector selects elements with a specific class attribute.  To select elements with a specific class, write a period (.) character, followed by the name of the class.

Definition and Usage

The .class selector selects elements with a specific class attribute.

To select elements with a specific class, write a period (.) character, followed by the name of the class.

You can also specify that only specific HTML elements should be affected by a class. To do this, start with the element name, then write the period (.) character, followed by the name of the class (look at Example 1 below).

HTML elements can also refer to more than one class (look at Example 2 below). 
Share:

Popular Posts