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!
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
18,133 PointsHow 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>

José Manuel Martínez López
18,133 PointsSorry, ok there it is.

Jason Anello
Courses Plus Student 94,610 PointsEdit: 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;
}

Kristen Law
16,244 PointsJason 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>

Jason Anello
Courses Plus Student 94,610 PointsThanks for the correction Kristen.
1 Answer

Kristen Law
16,244 PointsTry 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.

José Manuel Martínez López
18,133 PointsThank you so much.
Andrew Dushane
9,264 PointsAndrew Dushane
9,264 PointsYour code isn't showing, check out the Markdown Cheatsheet for how to post code.