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:" target="_blank">
    <img id="image" src="" alt="A Cute Lion" width="20%" height="20%">
    <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>
        <li>King of the jungle</li>

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.