--- title: A Href Attribute --- ## A Href Attribute The `` attribute refers to a destination provided by a link. The `a` (anchor) tag is dead without the `` attribute. Sometimes in your workflow, you don't want a live link or you won't know the link destination yet. In this case, it's useful to set the `href` attribute to `"#"` to create a dead link. The `href` attribute can be used to link to local files or files on the internet. For instance: ```html Href Attribute Example

Href Attribute Example

The freeCodeCamp Contribution Page shows you how and where you can contribute to freeCodeCamp's community and growth.

``` The `` attribute is supported by all browsers. #### More attributes: `hreflang` : Specifies the language of the linked resource. `target` : Specifies the context in which the linked resource will open. `title` : Defines the title of a link, which appears to the user as a tooltip. ### Examples ```html This is a dead link This is a live link to freeCodeCamp more with a href attribute ``` ### In-page anchors It's also possible to set an anchor to certain place of the page. To do this you should first place a tab at location on the page with tag and necessary attribute "name" with any keyword description in it, like this: ```html ``` Any description between tags is not required. After that you can place a link leading to this anchor at any place on the same page. To do this you should use tag with necessary attribute "href" with symbol # (sharp) and key-word description of the anchor, like this: ```html Go to Top ``` ### Image Links The `` may also be applied to images and other HTML elements. ### Example ```html picture ``` ### Example picture ### Some more examples of href ```html This gives a base url for all further urls on the page This is a live link to an external stylesheet ```