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


John Silverstein
John Silverstein
6,290 Points

Why not use a List element like UL to create two columns? similar to what is done in the porfolio page

the portfolio page has two columns working great side by side. So instead of creating two section elements why not create an UL with two Li's with costume width and height.

2 Answers

Hi John,

Your question isn't linked to any part of the course so I'm assuming you're talking about "How To Make a Website" and the portfolio and contact page which has 2 section elements.

You want to choose html elements based on their semantics, or meaning that they provide to your content. This is completely separate from how the content looks on the page which is what the css is responsible for.

For the portfolio page, you have a list of related portfolio items so it makes sense to put them in an unordered list. It doesn't matter that they've been styled visually to appear in 2 columns. In fact, later in the responsive part of the course, the width will be changed and they'll become 3 columns on wider screens.

The fact that they're laid out as columns wouldn't matter to search engines and screen reader users. All that matters is that you have a list of related items. The <ul> provides meaning and structure to that content.

On the contact page, the <section> element is used to wrap several related pieces of content into a major section of the page. You're basically saying "All of this content belongs together". A <ul> wouldn't be the right choice for this purpose.

So choose your html elements based on the meaning they provide and use css to style it however it needs to look. Try to keep those 2 things separated as much as you can.

John Silverstein
John Silverstein
6,290 Points

Yep, alot of sense it that. Thanks!