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 trial

HTML How to Make a Website Creating HTML Content Add Image Gallery Content

Do we need to start a new list for all images?

Or can we just keep it under the same list? Ex: <ul> <li> <img src="img/Tagliatelle Hila.jpg" alt=""> <p>1. Mushroom Tagliatelle</p> <p>with roasted asparagus with coconut oil and coriander</p> <p>(Tagliatelle, King oyster mushrooms, oyster mushrooms, shiitake mushrooms, chicken stock, parsley, chives, Parmigiano reggiano, garlic, butter)</p> <p>$12.99 / Serving </p> <img src="img/Hanger Steak Hila.jpg" alt=""> <p>2. Grilled Hanger Steak</p> <p> with salmoriglio sauce, roasted sweet potatoes and rapini</p> <p>(Hanger steak, sweet potatoes, rapini, garlic, lemon juice, fresh chillies, sweet paprika, parsley, mint)</p> <p>$14.99 / Serving</p> <img src="img/Halibut Hila.jpg" alt=""> <p>3. Pan Seared Halibut</p> <p>with horseradish, roasted kale and brown rice</p> <p>(Halibut, kale, brown rice, horseradish, lemon juice, onion, garlic, tomatoes, parsley, coconut oil)</p> <p>$19.99 / Serving</p> </li> </ul>

Cory Harkins
Cory Harkins
16,500 Points

Short answer is: No.

Long answer is=

Think about the layout. The "li" allows you to contain your images/recipes in a neat container. Similar to what you will learn later about the "div" tag. There are some styling issues to consider, but the skinny of it at the moment is, whatever your preference is. "li's" are block elements by default (someone correct me if I'm wrong). What that means is that when they show up in NDW (normal document workflow, i.e, top to bottom) they will display the first item, break a line, second item, break, so on and so forth. You can change this display (literally "display"), by making them "inline" or "inline-block" in CSS later. 

For the sake of exercise, I would create each recipe within it's own "li" that way when you get to positioning, you can restructure it with the use of div's.

1 Answer

Juan Guillermo Mariño
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juan Guillermo Mariño
Front End Web Development Techdegree Graduate 19,423 Points

Maybe you are confusing list with list item. The list is the unordered list <ul> that is a required for the browser to identify a list, inside that list <ul> you need to add the list items, you can add many items if you wish, but each item if its a pic, a text, etc is a list item <li>. And if later on you just wish to modify just one list item in the list or all the list you can do it with classes and you will se that later on in this course.