Welcome to the Treehouse Community
Looking to learn something new?
Wart Burggraaf9,948 Points
HTML semantic markup - Help needed
With my new project I try to use semantic markup in the right way. I need a little help with that.
I will turn the ul list into inline-block elements.
My question is: Do I need to put this all into a paragraph or can I just start with an ul list right away?
Here is my code:
<section> <h1>Recall. New plant. Equipment review.</h1> <p> <ul> <!-- recall --> <li> <a href="#"> <h2>Henk recalled a machine</h2> <p>Henk recalled his machine because it was dirty</p> <p>Read more</p> </a> </li> <!-- new plant --> <li> <a href="#"> <h2>Piet buys a new plant</h2> <p>Piet bought it for an egg and a chicken</p> <p>Read more</p> </a> </li> <!-- equipment review --> <li> <a href="#"> <h2>Jaap dislikes his equipment</h2> <p>Jaap dislikes his ugly equipment. He prefers pink</p> <p>Read more</p> </a> </li> </ul> </p> </section>
Peter Freeze25,620 Points
Hey Wart -
<ul> element is a block level element by default, along with the
<p> element should live at the same level in a hierarchy. So, to put it simply, no you do not (and probably should not) place a
<ul> element inside of a
No you start with the <ul> You dont put tags such as <ul> inside <p> tags
Tags you may put inside a <p> tag are <a> <br> <b> etc ones that relate to the text there self
Hope this helps :)