Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Finishing 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

"<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno so spicy</a>. </p> "

i 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ø
Christer Nordbø
2,133 Points

indent 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 :)

<p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeno so spicy</a>. </p>

thanks for that christer :)

Christer Nordbø
Christer Nordbø
2,133 Points

As 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 :)

cheers :)