ExamVeda
Login
Home
21
What will happen in this case?
p strong {background-color: yellow;}
Discuss
Answer & Solution
Answer: Option B
Solution:
All occurrences of the strong element within a p element have a yellow background.
22
A similar rule called the ____________ is specified using the plus sign (+) and is used to select elements that would be siblings of each other.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
23
Which of the following selectors selects any tag with an id attribute set?
Discuss
Answer & Solution
Answer: Option C
Solution:
Example:#test {color: green;}
/* makes a tag with id=’test’ green */
24
Which of the following selectors selects direct descendents?
Discuss
Answer & Solution
Answer: Option A
Solution:
Example: body > p {background-color: yellow;}
/* makes all p tags that have the body tag as their immediate parent have the background color yellow */
25
Which of the following selectors selects siblings?
Discuss
Answer & Solution
Answer: Option B
Solution:
Example: p ~ strong {font-style: italic;}
/* sets the font style to italic on all strong tags that have a p tag as a preceding sibling */
26
Which of the following selectors selects the specified elements of type E with a particular class value?
Discuss
Answer & Solution
Answer: Option A
Solution:
Example: h1.note {text-decoration: underline;}
/* underlines all h1 tags with class='note' */
27
Which of the following selectors selects adjacent siblings?
Discuss
Answer & Solution
Answer: Option C
Solution:
Example: h1 + p {color: red;}
/* makes all p tags that are immediately preceded by an h1 tag red */
28
What will be the output of following code snippet?
<style h1 {color: green;}> 
<h1>Hello</h1>
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
29
Which style is this?
<body style="background-color: lightcyan">
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
30
Is this correct way to apply css.State true or false.
<link rel="stylesheet" type="text/css" href="mystyle.css">
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board