Welcome to the Treehouse Community
Looking to learn something new?
Glen McAllister3,878 Points
Creating structure code challenge fail
Hi - I'm just starting out with the HTML Learning adventure & I've already hit a snag. It's asking me to add an id attribute to a div element & it's failing me on even that simple task. My code is
<div id="featured cupcake"></div>
It complains with "Bummer - did you put the id attribute in the right element?".
Err…yes. Did you perhaps write a defective parser?
Not quite sure, but that way you define two ids for the element (featured and cupcake). Maybe you should use featured_cupcake or something like that?
Chase Lee29,275 Points
When you put a space between words when defining a
class or and
id like this:
<div id="id#1 id#2"></div>,
id#2 are two different ids. The same is with classes:
<div class="class#1 class#2"></div>, once again
class#2 are different. But you could keep going on with both.
<div class="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 and_so_on"></div>1. Hope that helps.