Hi! can u guys focus on line 9 and 32 of the style.css file, notice the order of tags and classes, in the exercice i started by the tag(h5) as in line 9 it didn't work! is it the specify syntax of styling the <li> elements?

  • https://www.codecademy.com/paths/web-development/tracks/styling-a-website/modules/learn-css-selectors-visual-rules/lessons/css-setup-selectors/exercises/nested-elements
  • Hi.

    The “Nested Elements” exercise of that lesson shows you some example CSS relating to list items, but the actual task is:

    In index.html , each destination has a description paragraph below it. Inside each description, there’s a list of attractions. Let’s select the Top Attractions element and make it stand out more by making it teal.

    Navigate to style.css . Add a selector that targets all of the h5 elements nested inside elements with class .description .

    The task is to create a CSS selection which will apply to any <h5> element, which is itself inside another element of the class description.

    The example code shows you list items - <li> - nested inside of an unordered list with class main-list:

    <ul class="main-list">
      <li> ... </li>
      <li> ... </li>
      <li> ... </li>
    </ul>
    

    It also shows you the CSS selector which applies to those nested <li> elements:

    .main-list li {
        
    }
    

    Since the example gives you the CSS selector which applies to an li nested inside a .main-list class, can you see how you can change that to apply to an h5 inside a .description class? :slight_smile:

    1 Like

    thaks for you response. yeah i got it , i’am new in css, just realise that as HTML every element has it syntax, some of them are written in the same way…sorry if my english is bad i’m from france :sweat_smile:

    No problem, glad I could help. :slight_smile:

    1 Like

    This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.