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

Design

to set an href on a link.

how to set an href on a link

3 Answers

easy 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>

<a href="link">press me</a>

you looking for something like that?

Steven Parker
Steven Parker
231,007 Points

You 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">

True that, but also need to close element

</a>
Steven Parker
Steven Parker
231,007 Points

I'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.