Lesson 4: Why "span" and not ".span" as a child element?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-sass/lessons/hello-sass/exercises/nesting-sass

<In what way does your code behave incorrectly? Include ALL error messages.>
As a child element, I figured span would be “.span”, but when I put the period there, the code didn’t work right. How does the code know that “span” is supposed to refer to the span element in HTML? Is it because it is not a class?

```

.banner {
font-family: ‘Pacifico’, cursive;
height: 400px;
background-image: url(“lemonade.jpg”);
.slogan {
position: absolute;
border: 4px solid black;
top: 200px;
left: 25%;
width: 50%;
height: 200px;
text-align: center;
span {
font-size: 24px;
line-height: 200px;
}
}
}

<do not remove the three backticks above>

. indicates a class
# indicates an ID
elements, like span, p, h1, etc. have neither.

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