Html-Text links
Html – Text links (anchors)
The World Wide Web has its spidery name from the abundant connections (links) that link websites together with the click of a button. What most people don’t know is that HTML links are actually HTML anchors constructed using anchor tags (<a>).
HTML Text Link:
1 |
<a>Hello , I am a text link!</a> |
HTML Text Link:
Hello , I am a text link! |
While the example above seems and feels like a text link when viewed by a web browser, the feature is incomplete as it is missing a ley characteristic that references another web page called a Hypertext Reference (href).
Html – hypertext reference (href)
A Hypertext Reference (href) is an HTML characteristic of an anchor (link) tag that needs a valid URL in order to correctly manage a user to a various location. In other words, this Hypertext Reference is where users will navigate to if they do click on this link. Use the exhibition below as a reference.
HTML Text Link Code:
1 2 3 4 5 |
<a href="http://www.Htmlfreecodes.com/" target="_blank">Html free codes Home</a> <br /> <a href="http://www.free-driving-test.com/" target="_blank">Driving test</a> <br /> <a href="http://www.google.com/" target="_blank">Google Home</a> |
HTML Text Links:
Html free codes Home
Driving test Google Home |
Uniform Resource Locator (a URL) is the address of a website, and it performs like a street address for a website as a user is directed from one site to another. There are various kinds of URLs, and each has a partly various look.
Html – link targets
How each link will open when clicked is defined by the target characteristic. Will each one open in a new window, or will each one open in the current browser window? You as the web designer call the shots as to how a user navigates from page to page, while you know how to manage the target characteristic.
Link Targets:
Target= | Description |
---|---|
_blank | Opens new page in a new browser window |
_self | Loads the new page in the current window |
_parent | Loads new page into a parent frame |
_top | Loads new page into the current browser window, cancelling all frames |
The two key values are the top two, (target=”_blank” and target=”_self”). The _self value is usually the default. While _blank opens up a new web browser window with each click of the text link it loads each new page in the present browser window.
How you would link to google.com, a popular sports website is shown by the code below. The target characteristic is added so let the browser to open Google in a new window, so that the observer can have a window that stays opened to our website. Here’s the example.
HTML Link Target Code:
1 |
<a href="http://www.google.com" target="_blank">google.com</a> |
google.com |
Links are a tremendous segment of the user experience for any website. Always be aware of that when working on a site’s navigation. It is not the greatest way to entice users to stick around for a web page that opens a new web browser window each time a user clicks a link.
Html – email links
Producing an email link is simple. Placing an email link with a subject line already filled out for their id is a good way if you want people to mail you about your site.
HTML Email Link Code:
1 |
<a href="mailto:email@yourwebsite.com<?subject=Feedback" >Email@yourwebsite.com</a> |
Email Links:
Email@yourwebsite.com |
In some situations, it may be necessary to complete the body of the email for the user as well.
HTML Email Link Code:
1 2 |
<a href="mailto:email@yourwebsite.com?subject=Feedback&body=Sweet site!"> Email@yourwebsite.com</a> |
Complete Email:
Email@yourwebsite.com |
Html – download links
Locating files ready for download is done in precisely the same manner as locating text links. However, issues become confusing if we want to locate image links for download. The best solution for images is to utilize a thumbnail links, which will be investigated in the next lesson.
HTML Download Link Code:
1 |
<a href="htmlfreecodes.com/blog/web-designer.zip">Download File</a> |
Download a Text Document:
Download File |
Html – default links; base
In order to set a default URL for all links on a page to go to utilize the <base> tag in the head feature. Determining a base tag just in occasion your links become bugged somewhere down the line. Usually, you should determine your base to your home page.
HTML Base Link Code:
1 2 3 |
<head> <base href="http://www.htmlfreecodes.com/" /> </head> |