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 trialNicky Kadzombe
5,112 Pointsto set an href on a link.
how to set an href on a link
3 Answers
ayub ali
Courses Plus Student 723 Pointseasy and simple, just write the link's name between <a> tag oppening and closing </a> there should be writing the makes a name for your link, i hope it helps <a href="link">write here</a>
Ivan Bagaric
Courses Plus Student 12,356 Points<a href="link">press me</a>
you looking for something like that?
Steven Parker
231,236 PointsYou just put "href", and equal-sign, and the value you want to set it to inside quotes. All of this is added to the opening tag of the link (the "<a>
" tag).
<a href="http://your_url.com">
Ivan Bagaric
Courses Plus Student 12,356 PointsTrue that, but also need to close element
</a>
Steven Parker
231,236 PointsI'm assuming the complete link (with both open and closing tags) is already present, since the question is "how to set an href on a link".
So I intentionally focused solely on adding the href attribute and value to the opening tag.