Assistance needed with this code please

<div id="main">
  <h1 id="title">A Cute Lion</h1>
  <div id="img-div">
    
    <a id="tribute-link" href="https:https://en.wikipedia.org/wiki/Lion" target="_blank">
    <img id="image" src="https://media.istockphoto.com/photos/male-lion-staking-prey-picture-id1226843930?b=1&k=20&m=1226843930&s=170667a&w=0&h=NQo_BrATB1MyevNJZY5NiS7Zee9VCLWeeU7stXVEz8w=" alt="A Cute Lion" width="20%" height="20%">
   </a>   
    <figcaption id="img-caption">The lion is a well-muscled cat with a long body, large head, and short legs. Size and appearance vary considerably between the sexes. The male's outstanding characteristic is his mane, which varies between different individuals and populations.</figcaption>
    
    
    <p id="tribute-info">
      
        
      <b>Characteristics of Lion:</b>
      <ul>
        <li>Bravery</li>
        <li>Strong</li>
        <li>King of the jungle</li>
      </ul>
        
    </p>
   
</div>
</div>

My score is 9/10, and I get this error message: The element should be centered within its parent element…

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Have you tried to center the element in its parent element?

I think there are a few oddities. Why is your list inside the “img-div”? I also wouldn’t use a p to wrap the list - at least a div would be better.

Is there CSS associate with this?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.