Hyperlink going to blank page

Explorations in Art

      <a href="index.html">Home Page</a>
      <a href="privateparties.html">private parties</a>                                                                                                

pARTies by Ellen

I am learning with the kids and am one step ahead of them. I created hyperlinks in my website, but they just go to a blank page. What am I doing wrong?

Ellen

I’ve experienced something similar with my students. I’ve made Code aware of the issue, bu there is a work around until they can find a fix for it. If you have your student Share their page then copy the link to another tab in the browser. If the links are working, they should go where they’re supposed to in the browser. If they don’t within the browser then it’s definitely an html issue rather than a Web Lab issue. That’s been my experience.

@ellen.lafferty

Hi, can you share a link to the project that this is a problem for? This is usually caused by an error somewhere else in the html code that causes Web Lab to break the links. If you send us your project, we might be able to help you find the coding error.

Elizabeth

1 Like

Elizabeth:

https://studio.code.org/s/csd2-2018/stage/9/puzzle/4?section_id=1633591

Hopefully this works!

Thank you,

Ellen

Hi Ellen,
I am assuming the file name you specify in the href is case sensitive and must have the same spelling as the filename you see in your file list on the left tab. Also, was not able to access project link. Click on the share button on top left to share the correct link.


Each of those lines should have a corresponding html file with the same name.
If my file name is AddFavIcon.html my fifth link will fail as I have specified the link source as “AddFavicon.html”

Hi Ellen,

In order for us to see the code, you will need to share the project link. Unfortunately, the button to do that is hidden here to prevent students from sharing their code too early. To share this project with us…

  1. Go to bubble 11 in this lesson.
  2. Click on the “Share” button in the top left of the screen.
  3. Copy the link it gives you and paste it here.

Elizabeth

https://codeprojects.org/cjAgi-p_x9QIICcUQljkYSDbXyeceacfe0hhzadNjP0/

Hi Ellen,

Thanks for sharing the project. It looks like there are a few syntax errors, which is why the code has turned pink.

see code here

The image tag should be in the body, and it has an extra quote in it that’s messing up the rest of the code (and making it pink). Also, there is an extra h1 closing tag right after the title. At the very end of the page, there’s a closing paragraph tag that is missing a bracket and right after it an empty image tag.

If you fix those bugs, the links might work. There might be some more bugs, but those are the ones that stood out at me.

HTML/web development is good and bad in that the web browser will try its best to make the page render, even if there are a lot of bugs in the code. It’s good in that it is more forgiving and doesn’t frustrate you with a blank page just from one little wrong character, but it’s bad in that it sometimes makes it harder to figure out what’s going on when you’re looking for bugs in the code.

Elizabeth

Is there any correlation between links not working if students shared the lesson with a partner. I have two students whose links aren’t working and I am wondering if that is causing the problem. They partnered on the original html by accident.

Kathy

Kathy,

Can you share one of their projects? You can go to it, click on the “remix” button in top left hand corner and then share that URL. There are a number of things to look for before we submit a bug report. Thanks!

Brad

Here is the link to the students project:

https://studio.code.org/s/csd2-2018/stage/9/puzzle/6

Kathy,

Thanks for sharing, but that is actually a link to the level, not the students code. Take a look below to see how to share the code. If you don’t see the “share” button, please copy and paste the code so we can take a look. Thanks!

Brad

Thanks everyone! I was able to resolve the issue. It was sloppy programming and once we cleaned it up everything worked.

Ellen

Here is the correct link:

https://codeprojects.org/qt728m0ADUt6r6RPHiu2YFiXrke41CEWW2ZViw95e2k

Wow, thank you so much!! What exactly was wrong with it? It looks like it is working now.

Actually, when I click the link I sent you, that is correct. But it is still not working on my end.

Hi Kathy,

There are a couple problems with the syntax in the code that the student may want to look at.

For the img tags, there should be no “/img” at the end of the tag. It should either have just a slash before the right angle bracket or nothing. Also, all of the attribute values should be in quotes.

So, for line 23, this is wrong:
<img src="Alex%20Smith.jpg" alt=Alex Smith /img>
But these would be right:
<img src="Alex%20Smith.jpg" alt="Alex Smith" />
<img src="Alex%20Smith.jpg" alt="Alex Smith">

It’s also better in general not to have spaces in any of your file names. It just makes things a little more complicated.

Web Lab is not linking properly because of the syntax errors, but the regular browser is doing its best to link you even though the code is not exactly right. If the student corrects the syntax errors, Web Lab should link properly.

Elizabeth

I got it. I will try and see if it works.