Computers, Programming
How to link to your site page
A link is an element of a website page (one or more words, a picture, a button, etc.) pointing to another of its elements, another page, or leading to third-party resources. Internal links lead to pages hosted within your own site. A link with which you can go to another resource is called external.
Any beginner is sooner or later thinking about how to make a link, because this element is an important component of any site that provides the interconnection of its pages with each other. Moreover, links pervade the Internet space, integrating it into a single world wide web. As a given element, as already mentioned, any image or extract of a text can act.
How to make a link on the site page?
It is specified in the hypertext markup language - html using the pair tag "a" and consists of two main elements: address and text (or image). The address of any link corresponds to a special attribute - href. The text of this element is called anchor or anchor. In other words, the anchor is the place that we get to by clicking on this link. The transition can be made to any existing page in the network, as well as to any component of it, regardless of its extension (html, rar, mp3, etc.). Changes in the color of this element can be achieved by applying the cascading style sheet (css) rule to it.
How do I make a link using an image?
Add color to the page of your site by placing a link on it in the form of a picture. For these purposes, you need the image itself, peacefully lying in a folder on your PC. Next, instead of the text located between the "a" tags, you should specify the path to this image, without forgetting to add the href attribute to the opening tag. If everything was done correctly, you can see this image as a link on the website page opened in any Internet browser. In this case, around it will appear a thin, but very noticeable frame. In order to get rid of it, a separate selector a img is created in the css file and the border: none property is added (remove the frame).
How to make the link active?
Any modifications to the elements of a web page can be achieved by applying the properties of cascading style sheets. For example, a visited link in the language css is denoted as follows: a: visited; The link on which the mouse cursor is hovered , as follows: a: hover. Active is called a working link, leading to any page of the site or to a third-party resource. In order for it to be working, after its attribute it is necessary to indicate the full address of the page or the site to which it leads. In this case, we can also answer the question of how to make the link clickable. To do this, you need to copy from the browser window the address of the page to which it will lead. Further it should also be placed in the html-code of the page after the attribute of this link.
How to make a link in the form of a button?
Buttons, after clicking on which you go to any page of the site or a third-party resource, are also considered links. The appearance of such can vary significantly, depending on the imagination of the designer who creates them. The usual button is drawn in Photoshop. It is a small image, placed on the page of the site in the process of its layout. Further in the html-code of the page in the tag "a" is another tag "img", which denotes the picture. This tag should be appended with an attribute indicating the path to the button image on the computer.
Creating different links on your site, you should remember that their main purpose is user convenience in terms of navigation. Too many such elements can cause confusion to the user, which in turn ensures a decrease in site traffic. Links should be placed on its pages only when they are really needed.
Similar articles
Trending Now