Tribute Page help needed for image upload in codepen

Hello great people!
I created a tribute page as a first project, but I am unable to upload image of the lady .This is very first time I am using Codepen and doesnt know much about it.
It showed me a message somehting like u can upload files if you are a pro…
So i left efforts to upload image. But now when I am giving feedbacks to other tribute pages I noticed that eveyone has an image. please

this is the link

you can’t directly upload the image from your C directory
<img id=“image”

src=“C:\Users\DELL\Downloads\Documents\dr.-ruth-pfau-1.jpg”

alt=“Dr. Ruth Pfau”>

use something that already online. example
https: // i. pinimg. com/originals/10/1a/7a/101a7ac2eaf216ce79343f193dba96c3 . jpg
(remove the spacebar)

1 Like

Welcome to the forums @lumanaima.

As mentioned, you won’t be able to reference something that’s a file on your computer as codepen will not be able to find it. You can search for an image of the person and then when you find an image you want to use, right click on the image and select ‘copy image address’ and paste it into your code.

Further, codepen provides the boilerplate for you. It only expects the code you’d put within the body element in HTML. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.

You can read codepen’s official documentation.

There are other issues with your page so if you’d like additional feedback on your page, please ask.

1 Like

yes sure, tell me more about the issues my page has.

thank you for clearly mentioning my mistake. :slightly_smiling_face:

Good job on finding and image and incorporating it into your page.

Some things you can revisit;

  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in HTML. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.
    • You seem to know this. I only mention because the test script is JavaScript. It would not go into the head element. It won’t work if there. It would be placed right before the closing body tag. For codepen, it can be the first line in the HTML section or the last line.
  • The style element is only used for internal styling. Since the preferred method of styling is external and codepen uses external styling you don’t need to put the the style element in the CSS section. It will cause problems with codepen.
  • Run your HTML code through the W3C validator.
    • There are HTML coding errors you should be aware of and address.
    • Since copy/paste from codepen you can ignore the first warning and first two errors.
  • Codepen provides validators for HTML, CSS and JS. Click on the down arrow in the upper right of each section and then click on the respective ‘Analyze’ link.
    • The one for CSS is good. Use it, there are things to clean up.
      • You may have to run it more then once. Clean the error, run it again. Repeat until it finds no more errors.
    • (The one for HTML misses things which is why I recommend W3C)
  • Review the lesson about giving meaningful text to links.
1 Like

thanks for the great feedback. let me start improving things