CSS Attribute Selectors
- A similar rule called the ____________ is specified using the plus sign (+) and is used to select elements that would be siblings of each other.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
class selectors
- Which of the following selectors selects any tag with an id attribute set?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Example:#test {color: green;}
/* makes a tag with id=’test’ green */
- Which of the following selectors selects any tag with an id attribute set?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Example:#test {color: green;}
/* makes a tag with id=’test’ green */
- Which of the following selectors selects direct descendents?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
body > p {background-color: yellow;}
/* makes all p tags that have the
body tag as their immediate parent
have the background color yellow */
- Which of the following selectors selects siblings?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
p ~ strong {font-style: italic;}
/* sets the font style to italic on
all strong tags that have a p tag
as a preceding sibling */