Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,486 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.