Class 6 Exam  >  Class 6 Tests  >  CSS for Beginners  >  Test: Selectors - Class 6 MCQ

Test: Selectors - Class 6 MCQ


Test Description

10 Questions MCQ Test CSS for Beginners - Test: Selectors

Test: Selectors for Class 6 2024 is part of CSS for Beginners preparation. The Test: Selectors questions and answers have been prepared according to the Class 6 exam syllabus.The Test: Selectors MCQs are made for Class 6 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Selectors below.
Solutions of Test: Selectors questions in English are available as part of our CSS for Beginners for Class 6 & Test: Selectors solutions in Hindi for CSS for Beginners course. Download more important topics, notes, lectures and mock test series for Class 6 Exam by signing up for free. Attempt Test: Selectors | 10 questions in 10 minutes | Mock test for Class 6 preparation | Free important questions MCQ to study CSS for Beginners for Class 6 Exam | Download free PDF with solutions
Test: Selectors - Question 1

What type of selector is used in this case?
p {line-height: 150%;}

Detailed Solution for Test: Selectors - Question 1

These selectors are called element selectors and are simply used as follows: 
element-name { /* properties */ }

Test: Selectors - Question 2

The _____________ attribute is used to define the name(s) of the class(es) to which a particular tag belongs.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Selectors - Question 3

A similar rule called the ____________ is specified using the plus sign (+) and is used to select elements that would be siblings of each other.

Test: Selectors - Question 4

Which of the following selectors selects direct descendents?

Detailed Solution for Test: Selectors - Question 4

body > p {background-color: yellow;}
/* makes all p tags that have the
body tag as their immediate parent
have the background color yellow */

Test: Selectors - Question 5

Which of the following selectors selects the specified elements of type E with a particular class value?

Detailed Solution for Test: Selectors - Question 5

h1.note {text-decoration: underline;}
/* underlines all h1 tags with
class='note' */

Test: Selectors - Question 6

Which of the following selectors selects adjacent siblings?

Detailed Solution for Test: Selectors - Question 6

h1 + p {color: red;}
/* makes all p tags that are
immediately preceded by an h1 tag
red */

Test: Selectors - Question 7

By applying an ___________ a style can be applied to just a single tag.

Detailed Solution for Test: Selectors - Question 7

By applying an id rule, a style can be applied to just a single tag. For example, if we name a tag with a unique id attribute as follows
<tag id="id-value">Affected Text</tag>

Test: Selectors - Question 8

What will be the output of below mentioned code snippet?
p strong {background-color: yellow;}

Detailed Solution for Test: Selectors - Question 8

All occurrences of the strong element within a p element have a yellow background.

Test: Selectors - Question 9

Which of the following selectors selects any tag with an id attribute set?

Detailed Solution for Test: Selectors - Question 9

:#test {color: green;}
/* makes a tag with id=’test’ green */

Test: Selectors - Question 10

Which of the following selectors selects siblings?

Detailed Solution for Test: Selectors - Question 10

p ~ strong {font-style: italic;}
/* sets the font style to italic on
all strong tags that have a p tag
as a preceding sibling */

10 videos|41 docs|23 tests
Information about Test: Selectors Page
In this test you can find the Exam questions for Test: Selectors solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Selectors, EduRev gives you an ample number of Online tests for practice

Top Courses for Class 6

10 videos|41 docs|23 tests
Download as PDF

Top Courses for Class 6