====== Anchor Tag ====== ---- ===== Definition ===== The **anchor tag** is an HTML element used to anchor [[hyperlink|hyperlinks]] to an element on the website (e.g. text or an image). It can e.g. link to a subpage of the [[website]], the home page or another related page. This way you can connect a lot of individual files to a single website.\\ When linking to internal pages (i.e. on the same website), you should use only the file's path and name instead of the complete URL. Under certain conditions, this can decrease the load time of the page. Furthermore, links can go from one website to another. == Example == We tested this SEO software. We tested [[http://www.aseops.com|this SEO software]]. ---- ===== Attributes ===== Like most HTML elements, an anchor tag can also have various attributes. Here are the most important ones: ==== href ==== The href attribute defines the target URL. ==== name ==== The name attribute defines a name for the anchor tag. This name can be used afterwards to link exactly to this anchor on the page. == Example == First you put an anchor tag on some text and give the tag a name. Chapter 1: Introduction Then you add ''#//name//'' to a href attribute on another page: ''In ''Chapter 1'' of our project, we...'' **Attention!** In HTML 5 the name attribute was replaced by the id attribute. ==== target ==== The target attribute defines where the link will be opened. The target attribute can have one of the following values: _blank, _parent, _self, _top ---- ===== Importance for SEO ===== While too many anchor tags can confuse the visitor, too few can make navigation more difficult. So it's important to use an amount appropriate to the website's size. Search engines also analyze the links from a website and the linked content. Depending on the reputation of the website where the link comes from, this means that rating of the linked page can improve because of the link. ---- ===== Further information ===== The anchored text of the anchor tag is called [[anchor_text|anchor text]].