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 trialchris lightfoot
10,217 PointsFinishing the html-Build a simple website
Hi
I am currently working through the finishing the html video, during this video i get to the point where i add the code below:
<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno so spicy</a>. </p>
when i save this code and view it "our newest cupcake are" is showing as a link rather than as text, can anyone tell me the reason why this has happened. cheers
Chris Lightfoot :)
7 Answers
chris lightfoot
10,217 Points"<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno so spicy</a>. </p> "
chris lightfoot
10,217 Pointsi guess my next question would be" how do i post code onto a post" lol as the code hasnt come up on the post.
Christer Nordbø
2,133 Pointsindent the code with four spaces ;)
Like this
If thats to much work you can use a tool like www.pastebin.com and just paste the URL of the code into the post :)
chris lightfoot
10,217 Points<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno so spicy</a>. </p>
chris lightfoot
10,217 Pointsthanks for that christer :)
Christer Nordbø
2,133 PointsAs you can see from the code you pasted..
this:
<a href="#">Bacon Me Crazy</a>
\
<a href="#"></a>
is a anchor tag. Everything between the tags will be linked to the URL specifyed where the #\ tag is.
If you remove the tag and you will end up with:
<p>Our newest cupcakes are Bacon Me Crazy and Jalapeno so spicy. </p>
Have a look at this video to have it explained in more details: http://teamtreehouse.com/library/websites/html/links/anchors
Hope this helps & Happy coding :)
chris lightfoot
10,217 Pointscheers :)