CSS Attribute Selectors


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    class selectors


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

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



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

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


  1. Which of the following selectors selects direct descendents?











  1. 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 */



  1. Which of the following selectors selects siblings?











  1. 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 */