I am trying to write my code to be as semantic as possible and am wondering if it is more correct to write text within a list item as…
<li>
<p>This is my text</p>
<p>This is another bit of text</p>
</li>
or
<li>
This is my text
<br />
<br />
This is another bit of text
</li>
Thanks for any help.
Just do as you would do as if you had some text directly in the body. So, use
h1,h2etc for headings and usepfor paragraphs. So to answer your question, I would go for option one and use<br/>within the text if you need so but wrap it with thepelement.Also, you can take a look at the brand new html 5 elements to give your text more meaning.