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


José Manuel Martínez López
José Manuel Martínez López
18,133 Points

How can i redirect from an html document to another html but inside of a div?

I tried using this: <strong><li><a href="index.html/#proyectos">proyectos</li></a></strong>

Andrew Dushane
Andrew Dushane
9,264 Points

Your code isn't showing, check out the Markdown Cheatsheet for how to post code.

Edit: Fixed link based off of Kristen's answer.

Hi Jose,

I recommend that you fix your html since it's invalid.

You've closed off your </li> inside of the a element and you can't have a li element inside of a strong element.

If you used strong to make it bold then I would do that in css.

I would use this <li><a href="index.html#proyectos">proyectos</a></li>

Then in your css:

li a { /* Use whatever selector is appropriate for you */
  font-weight: bold;

Jason Anello, good catch! Guess I should pay more attention to the code I'm copying and pasting in haha

One note though: you may want to edit your comment to have the correct a href link:
<li><a href="index.html#proyectos">proyectos</a></li>

Thanks for the correction Kristen.

1 Answer

Try it without the slash (/):

<strong><li><a href="index.html#proyectos">proyectos</li></a></strong>

Edit: See Jason's comment up above. This html code is incorrect. I was only paying attention to the href attribute in the <a> tag.