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 Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications Test: Creating an HTML Element

How do I insert anchor tag?

I don~t know how can I insert an anchor tag

4 Answers

<a href="example.com" >Text for link here</a>

Thank you very much :)

Your Welcome! If you thought that I gave a good answer you can also mark my answer as " Best Answer"

You can also use anchors for id's within the same page. For example, if you want to go to the top of the page

<html>
<head>
<title>Page 1</title>
</head>

<body>
<h1 id="top">Top of the page</h1>
      <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<a href="#top">Click here to go to the top of the page.</a>
</body>
</html>