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 trialPabba Anu Bharath
2,049 PointsNot able to pass this challenge
Finally, list all of the flavors of ice cream in the unordered list below. Use either a for tag to list all the flavors in <li> tags or the unordered_list filter.
<html>
<head>
<title>Ice Cream</title>
</head>
<body>
<div>We have {{ flavors.count }} flavors today.</div>
<ul>
{% for flavor in flavors %}
<li>{{flavor}}</li>
{% end for %}
</ul>
</body>
</html>
2 Answers
Alexandra Barnett
Front End Web Development Techdegree Graduate 46,473 PointsHi Pabba! You were almost there! The end for at to end the for loop shouldn't have a space between the 'end' and the 'for':
<html>
<head>
<title>Ice Cream</title>
</head>
<body>
<div>We have {{ flavors.count }} flavors today.</div>
<ul>
{% for flavor in flavors %}
<li>{{flavor}}</li>
{% endfor %}
</ul>
</body>
</html>
Let me know if you have any questions :)
Andrew Furzer
Python Web Development Techdegree Student 7,364 PointsSimilar to the filter for linebreaks creating paragraphs, using the filter |unordered_list is the alternative method.
In this case it would be {{ flavors|unordered_list }}.
Sean Coutinho
7,788 PointsSean Coutinho
7,788 PointsDo you know how to use the unordered_list filter alternative?