Tribute page error time

Here is my HTML

div id ="main">
  <h1 id= "title"> Robert Downy Jr.  </h1> 
  <h2> An excelent actor that played iron-man </h2>    
  <div id= "img-div">
       <img id= "image" src = "" alt-id= "Robert Downy jr"  </img> 

     <figcaption id= "img-caption"> "Robert Downy Jr" </figcaption>

where is the issue here, only started a few days ago, recieving an error regarding img-caption not adjusting right

here is a much better view lol

and this as well

@E-person you can use Html validator to check your code and code pen analyzer for CSS and HTML which are build in the codepen editor and proved a link to your codepen.

Hope it helps out I just learned this yesterday.

1 Like

I would suggest you to add a link to your codepen here instead of manually writing your code so it is easier for others to debut it. if your image is not showing, from the snippet you provided it looks like you forgot to close your img tag.

 alt-id= "Robert Downy jr" >

use this instead

Hope this helped! :slight_smile:

1 Like

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

1 Like

The img element is an empty element it can not contain children, as such it does not use a end tag, i.e. </img> is not valid.

You can revisit the Add Images to Your Website challenge as well.

1 Like

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