Why this error message?

<!DOCTYPE html>
<main id="main">
  <h1 id="title"> Albert Eistein </h1>
  <figure id="img-div">
    <img id="image"
      src="https://static.independent.co.uk/s3fs-public/thumbnails/image/2018/12/05/11/albert-einstein.jpg"
      alt="This is the official portrait of Albert Eistein">

    <figcaption id="img-caption"> Einstein's official portrait
    </figcaption> <br><br>

Error: [The value of the href attribute [ https://en.wikipedia.html/wiki/Albert_Einstein ] must be relative.]

I edited your post so that your HTML shows up as source rather than being inlined into the forum. In the future, you can use the “preformatted text” button on the formatting toolbar (it looks like </>) to format any code you want to paste.

It looks like you didn’t paste all of your code however, and I don’t see the link in question.

1 Like

Do you have the link to your code? What error message do you get?

thanks

The last link is a dead one and it should read as https://en.wikipedia.org/wiki/Albert_Einstein

@Osagie, are you seeing this message when running the validator in codepen? If so, I’m not sure why it’s showing nor am I sure what validator codepen uses. You can ignore that message.
If you’d like, use the W3C validator to check your code. Just a side note, since codepen only requires you to put in code that would go between the <body> </body> tags the W3C validator will flag that you’re missing the head tags. You can ignore those.

1 Like

Error: The value of the href attribute [ https://en.wikipedia.html/wiki/Albert_Einstein ] must be relative.

Something to do with the language I suppose.

Don’t know how to fix it.

Well, this is how I understand relative linking:

Relative linking has to do with local files. For an instance: you have the master folder where you have the index page. Then, an image folder where you have images. Therefore linking from the index page to the image folder is known as relative linking.
“index.html/image/cat.jpg”.
That said, linking on internet webpages is known as absolute linking.

I stand to be corrected :slightly_smiling_face:

Having clicked on your link, I find out that you have a broken link.

https://en.wikipedia.o/wiki/Albert_Einstein instead of

https://en.wikipedia.org/wiki/Albert_Einstein

1 Like

Yes on codepen. I have done it on w3school on html without css codes and a click on the wikipedia link on the output page works well.

Don’t know exactly how it’s different on two environments.

Still the same error.