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

JavaScript JavaScript Basics (Retired) Making Decisions with Conditional Statements Introducing Conditional Statements

li a? or a li...

i know theres a difference in the order and what they do. I kike <a><li>home</li></a> better cause it seems to make styling easier. Is there a problem doing it that way? I'm pretty sure Nick in "building a wesite" did it the reverse.

rats, i keep posting stuff wrong... lemme try again {<li> <a>home</a></li> or <a><li>home</li></a>}

that didnt work either lemme try this " li" "a" home... or "a" "li" home

3 Answers

Hi John,

Block-level links in HTML5 are acceptable.

I've specifically run into problems recently when trying to nest a li inside a. It's not valid HTML, technically the browser is only ever expecting to see li children of an ul or ol.

See this on stackoverflow