A link tag is considered important among the rest of the markup tools within the meaning that hypertext carries, but you can do without it when developing web resources. HTML has a lot of archaic and promising rules, but the “a href” tag is the case when a rule should be used because it is generally accepted.
The opinions of developers, search engines and the HTML standard are good criteria. The markup language is the frame of the page or its element, but the semantics of the scope and understanding is what makes such a frame comfortable and informative and productive for the visitor.
Application example and description
The “a href” link cannot be nested, but it may contain content in which you can put not only text or an image explaining the meaning of the category that the developer defines, but also other lowercase tags.
Example. See below for options for linking to the “a href” site http, www , mailto and * .pdf.
You can use lowercase elements as internal tags, such as strong, br, i, sub, sup ... You can apply style and specify display options in CSS: visited, hover , active.
In this example, the first link points to an external site, the second - to the position (anchor) of the current page. The third link allows you to specify an e-mail address and when you click on it, it calls the mail program installed by default in the system to send a letter. The fourth link allows you to download the document.
Tag syntax and attributes
The <a> tag can be used in two ways: “a href = 'URL'” and “a name = 'name'”. In the first case, this is a link, in the second case, it is an anchor, that is, the position on the current page that the browser will go to when you click on the link in which the name of this anchor is indicated.
The tag is supported by all browsers and is included in all specifications. The link address can be absolute and relative, you can specify the protocol: “http: //”, “ftp: //”, “mailto:” and others.
The “a href” link allows specifying the target attribute, through which the developer can specify where to open the document: in the current window (_self), in a new window (_blank), in the parent frame (_parent) or in a new browser window (_top).
The <a> tag provides the ability to specify the exact coordinates of the places where the visitor can click and create a map of the clickable area. Use this opportunity, due to prevailing trends, should not be.
Semantics of Internal Link
It can be used on the site “a href” for movement along anchors. This is a common practice for navigating the current page. This is usually used to return to the top of the page from any position on the page that the visitor found himself when viewing it.
In combination with CSS tools, you can define a floating element at the bottom (side) of the page, which will constantly provide the visitor with the opportunity to appear at the top of the page, where its main functionality is usually located.
You can make a floating menu that will contain all the links of the current page that are available to the visitor.
It is very convenient to use navigation through the lists <ol> & <li>, <ul> & <li> and form their contents depending on the visitor’s rights, making accessible links visible and not accessible to hide.
External Link Categories
The site “a href http:” can be internal or external. An internal link points to other pages of this site, which, when using absolute addressing, does not distinguish such a link from a link to an external resource on the World Wide Web.
Both external links and internal ones are, first of all, categories that define the desired meaning, and this should be given appropriate importance when developing a web resource.
Each site is characterized by a link mass that points to it and provides an exit from it to other resources of the Global Network. It matters to search engines and parsing.
Correct indication of the content of the link - the correct position in the search results and a greater number of visitors.
New link features
The “a href” link can be used to indicate a phone number, go to Skype chat, send a file to a user or add to the contact list.
As in the case of sending mail, an external program (site) will be downloaded here. Using these features is undesirable for two reasons. The visitor leaves the site in an area controlled by another program. This is not a smart decision because the site is losing a visitor.
The second reason is more significant. Links are an attractive element of any page not only for search engines, but also for parsers, which are aimed at collecting relevant information for spamming or other malicious purposes.
A long time ago the rule became inviolable: not to allow any private information in the content of the pages: phones, e-mail, skype, addresses, links to social networks.
The “a href” link should be used for its intended purpose, not including in its content any information that the visitor or robot can use at its discretion.
The site should control the visitor’s behavior, and provide robots and search engines with only the information that they “consider” necessary.
Link Optimization
Using links is necessary, but how to use them to get the perfect combination of website quality and search engine interest to achieve first position in search results?
First of all, you should block all the possibilities of leaving the site outside of a specific context (category). If the visitor clicked on the link, then he gets to the right place in the current page or another page of the site within the meaning. If he goes to another web resource, then this is also a specific category of transition.
Any output to an external program should be emulated with its own version of mail, chat, sending a file or other action. This recommendation, in addition to objective utility, gives the site a greater positive rating. Indeed, a site that has its own messaging system or its own chat receives more weight in the eyes of the visitor, who is provided with the usual functionality in place.
Each search engine has its own algorithm for analyzing the content of the site and relates differently to links. For example, using links as indexes or categories of their own site, the developer makes it clear that his resource is systematized and thematically interconnected by pages. The priority of external links over internal ones may give a reason for the search engine to position the resource as a trash can that collects links from other resources for the sake of some benefit.
In all cases, when designing and optimizing a site, it is first of all necessary to formulate its main semantic content, which, in terms of meaning, should be linked by “a href” links adequate to this content.