I’m just wondering how I can make it so that I have a clear division between list items without copy and pasting <br/>
tags. I thought that if the image is contained within the <p>
tag and that tag is closed prior to the next entry, that that would effectively "press enter" (if you will), so that the next header or text bit doesn’t wrap around the image of the previous list item. I feel like I’m missing something simple here.
<li><h5>Artificial intelligence (AI)</h5>
<p><img src="AI.jpg" width="150" height="150" align="left" hspace="10"/> AI systems were limited in their capabilities,
but recent advancements have propelled AI into the mainstream. Today, various AI models power virtual assistants,
business process management, and advanced data analytics. In just a short period, AI is predicted to become an
integral part of our lives.</p> </li>
<br/>
<br/>
<br/>
<br/>
I tried to contain the image tag within the paragraph tag of the list item, thinking that this would naturally create a space between the next entry of the list.
2
Answers
Your code will work but using
<br>
tags in an unnumbered list will give an error on page validation.Also all your content is within one set of
<li>
tags. Maybe try adding some others. Use some css such asIt looks like you are trying to structure a list with images and text in HTML. If you want to separate list items without using multiple
<br>
tags, you can use CSS to style your list items and create clear visual divisions between them. Here is the code :CSS
HTML