Tribute Page - Build a Tribute Page

Tell us what’s happening: I keep failing at setting my image element’s display to block.

Describe your issue in detail here.

Your code so far

<main id="main">
  <title id="title">Nelson Mandela</title>
  <div id="img-div" align="center"><img class="image" id="image"></img>
    <div id="img-caption">Father of the nation</div>
  </div>
  <p id="tribute-info">This is how Nelson brought the nation together</p><a id="tribute-link" rel="stylesheet" href="styles.css" target="_blank"></a>
</main>

/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Tribute Page - Build a Tribute Page

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Welcome to FFC forum. You didn’t have html boilerplate for your content.

hi sorry for bothering you but it still doesn’t pass.

please show us your new code so we can help you

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 (').

1 Like

I have formatted your code, so we can read it better.

you haven’t posted any css in this code.
we need to see your css.
if you haven’t written any, then that is why the test is failing

if you need help, here is a helpful article on how to center elements

But also, there are a few things I noticed in your HTML.

the title element should be used in the head section not in the body.
The title element sets the title for the document. You will usually see it in the browser tab for a website

It looks like you wanted to use an h1 instead

It is best practice to leave your styling to css and have your HTML represent the content.
So I would remove that attribute

remember that images are self closing meaning they don’t have end tags

these attributes shouldn’t be inside your anchor tag.
Those attributes should be inside your link element which goes inside the head element.

Here is article on how to create an HTML boilerplate

Hope that helps :+1:

thank you so muc :partying_face: :partying_face: :partying_face: :pray: :pray:

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