Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSai Kiran Sagaram
3,688 PointsWhat is the correct answer for this question?
Fill in the blank to create a new, empty list item element and add it to the DOM.
$('.my-ul').append('li');
1 Answer
Steven Parker
231,275 PointsWhen using a string with "append" (it can also take an element argument), the string should be complete HTML.
So in this case, instead of just the tag name, the string should contain the complete beginning and ending tags just as if you were writing them into the HTML file.
Sai Kiran Sagaram
3,688 PointsThank you Steven Parker.
Michael Pashkov
22,024 PointsHi Steven! I didn`t get. Pls, help.
Bummer! Unfortunately, that answer is incorrect. $('.my-ul').append('<li> </li>');
Steven Parker
231,275 PointsTry removing the space between the two tags to make it truly "empty".
Michael Pashkov
22,024 PointsIt helped, thank you!
Jan Oberreiter
78,020 PointsJan Oberreiter
78,020 Pointsyour code block is hard to read ... maybe, if you use markdown and better, you specify the exact question for future questions ... it will be easier for ppl to help you ... the markdown ... if you write:
javascript ... before any code, it will appear in "the dark box" and will be easier to read ... because now I cannot see any blanks ... if it is a different language than JS, just always write the three
symbols and specify the language after ... then leave a blank line and then write the code block ... sorry I couldn't answer your question ... but I hope this will held you in general in the future ... regards, Jan.like:
$('.my-ul').append('li');
the code fences don't show up ... before the language specification ... three: ```