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 trialAndrei Li
34,475 PointsW3C specification doesn't permit <main> to be used as a descendant of <article>, <aside>, <footer>, <header>, or <nav>.
MDN Article. So I can't use <main> before <article>, <aside>, <footer>, <header>, or <nav>. Can I? Or I misunderstood meaning of the word descendant?
2 Answers
Tianni Myers
10,453 PointsI believe you just canβt nest <main> inside of the other tags in laymanβs terms.
Andrei Li
34,475 PointsSo I can't use <main> inside <article>, <aside>, <footer>, <header>, or <nav>. Am I right? Or I can use it only inside <body> but not inside other tags.
Tianni Myers
10,453 PointsRight. Check out this diagram from W3C. That's generally how the tags should be used. https://www.w3schools.com/html/html5_semantic_elements.asp