Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Link Issues...

Could anyone, please, tell me why my Portfolio is not linked in my workspace? - Here's the code I'm using: <li <a href="Amil.html">Portfolio</a> /li>

12 Answers

Johan Marais
Johan Marais
15,920 Points

Hi, You have not added any code, please refer to the Markdown Cheatsheet on how to add to code.

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Okay, maybe I'm not reading the instructions correctly, I don't know, but this, just, isn't working - I can't figure out how to make my code appear...

Johan Marais
Johan Marais
15,920 Points

you need to use three(3) back ticks. i.e the key left of Z. after the three(3) back ticks write html and then paste code after that. Once you are done en your code with another three(3) back ticks

Wilfredo Laboy
Wilfredo Laboy
2,019 Points

Hello Amilcar, To post your code you need to type

~~~html
 your code here 

followed by 3 of these ----> ~

Not sure if you are referring to the navigation area but this is what it should look like.

<nav>
        <ul>
          <li><a href="index.html" class="selected"> Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
      </nav>

Hope that helps if not could you get a little more specific.

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Hmm - They didn't say anything about "selected" in the vid. demos, but okay - I'll try it - Thank you...

Julian Gutierrez
Julian Gutierrez
19,201 Points

The code you typed in your question is missing characters. You need to close your li tags like so:

<li> [your content] </li>

So your code would look something like this.

 <li> <a href="Amil.html">Portfolio</a> </li>
Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

This is my, exact, code - I DID change the word "Portfolio" to "Biography" - I'm doing something a little different with my website - Anyway this is it - It's STILL not linking:

<li><a href="Amil.html">Biography</a></li>

Julian Gutierrez
Julian Gutierrez
19,201 Points

It's hard to be certain, not being able to look at your file structure and all, but a couple things to check would be:

  1. Does the file Amil.html exist?
  2. Does the file exist in the same folder in which your index.html file is located?
  3. Does the file contain a capital "A" like in your href? (Note: It's a good practice to refrain from using capital letters when naming your pages)
Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Yes, for all questions - The "Amil" is my name, but I'll trying using a lower case and see what happens - Thank you...

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

The lower-case approach didn't work - I, even, went so far as to change the name back to index.html - That didn't work either - So, I don't know what to do, here...

Wilfredo Laboy
Wilfredo Laboy
2,019 Points

Hmm, disregard the selected portion of that code. That was for something else. Are you using workspace? Also make sure that the file is in the correct directory in which you are searching. If the html file is another folder you are going to have to write the directory for which folder it is in.

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

I am using workspace, and it is in index.html now, actually...

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Okay, so, for all interested parties, I FINALLY figured out what the problem was - This should have been my code, the whole DAMN time, apparently:

<li><a href="biography.html">Biogrpahy</a></li>

Unbelievably, what an irritating itch... smh

Julian Gutierrez
Julian Gutierrez
19,201 Points

Good to hear, just wait till you spend hours troubleshooting a site to then find out your just missing a semicolon, closing bracket, etc.

Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

Ho hum - Can't wait... smh/P :)