HTML Links

HTML Iframes

A link connects one web resource with another. For instance, a user might want to view a video that is on a different webpage from the one that he is currently viewing – if a link to it is available on his current page, he can use it to connect directly without copying and pasting the video’s URL on his address bar. A link’s major properties are two anchors and its direction. The source anchor is represented by the webpage from which a link originates. It points to the destination anchor or the webpage where a video, image, or another HTML document is located.

The default color codes are blue for unvisited links, purple for visited links, and red for an active link although you can style yours differently using cascading styles sheets (CSS). Use the <a> tag to specify a link in your html document. Note that a link can be a word, a phrase, or an image. Below is the syntax for a link and an example that illustrates it.

<a href=”url”>Text link</a>

<a href=”https://htmlkick.com“>Tutorial HTML Kick</a>

A target attribute of a link indicates to a browser, where it should open it. In HTML 5, the only relevant target is _Blank, which opens a link in a new tab or window. Earlier versions of HTML supported targets like _parent, _self, and _top that were used to specify frames but they have since been deprecated.

Use the id attribute whenever you need to create a bookmark inside a webpage. Note that download links are created the same way text links are created. However, download links that point to pdfs or images first open the files in the browser after which a user can take further action of saving them to a computer’s hard drive.