If you want to know about the different types of links on websites, here is a quick tutorial with examples. HTML code is included.
When you link to another website or even your own site, the HTML code you use is important. The tag options and anchor text affect Search Engine Optimization (SEO) and user experience.
About Link Building for SEO
Link building is the process of acquiring hyperlinks (backlinks) from other websites to your own website. These links can be considered as “votes” for your website, and can help to improve the search engine rankings of your site. It may be part of a Search Engine Optimization (SEO) strategy.
Link building can be done through a variety of methods, such as creating valuable content that other sites will want to link to, reaching out to other webmasters to request links, or by participating in link exchanges with other sites. Here is an outline of strategies and methods.
- Content creation: Create valuable and informative content that other websites will want to link to. Examples: blog posts, infographics, videos, and other types of multimedia.
- Outreach: Reaching out to other websites and webmasters to request links. Examples: guest blogging, broken link building, and other forms of link request.
- Paid guest posts: Paying a website to publish an article or blog post that includes a link back to your own website. This is a form of link building that can be used to acquire high-quality links and improve search engine rankings.
- PBNs (Private Blog Networks): A link building strategy that involves creating a network of websites that are used to link back to a main website. These websites are often set up on expired domains.
- Social media: Use social media to promote content and acquire links. Examples: sharing links on Twitter, Facebook, and other social networks, as well as participating in social media communities and forums.
- Local citations: Acquire links from local business directories and other websites that list local businesses.
- Brand mentions: Acquire links from other websites that mention your brand or business without linking to it.
- Competitor analysis: Analyze your competitors’ backlink profile (e.g. using Ahrefs), and try to replicate their link building efforts.
However, it’s important to note that Google and other search engines have become increasingly strict about the types of links that they consider to be “good” or “bad”. Some link building techniques can be considered as spammy or manipulative, and can result in penalties or other negative consequences.
What <a href="">
Means
<a href="">
is an HTML tag used to create a hyperlink. The <a>
stands for “anchor” and the href
attribute specifies the URL or location of the file to which the link points. The text or content between the opening <a>
tag and the closing </a>
tag is displayed on the page and is clickable, allowing users to navigate to the link’s destination.
For example, the following code creates a link to the Google homepage:
<a href="https://www.google.com">Google</a>
When this code is rendered in a web browser, the word “Google” will be displayed as a clickable link that directs the user to the Google homepage when clicked on.
1. Simple External Link
You may notice that HTML links consist of a starting tag and closing tag. The starting tag looks like this: ‘<a href=””>’. The closing tag is just ‘</a>’.
A simple external link only has two elements that you need to worry about. One is the target URL (or web address) on a different (external) website. The target URL goes inside the quotes in the starting tag.
The other bit is the anchor text. This is plain text usually and goes between the starting and closing tags. The anchor text is “HTML link” in the example.
A simple external link is good for the target (or destination) page in terms of SEO. All the “link juice” is passed along. Clicking the link takes the user directly to the page.
The anchor text affects SEO, especially for the target page. You can read more about choosing the anchor text in this MOZ anchor text SEO article.
Users can see the link easily as long as the highlight color for hyperlinks is quite different from normal text color. If not, you can always bold the text.
2. Link that Opens in a New Tab
The ‘target=”_blank”‘ attribute is how you force a new tab or window to open when a user clicks or taps the hyperlink. Just add that little piece of HTML code inside the opening tag.
The target
attribute is an HTML attribute that is used in conjunction with the <a>
tag to specify where to open the linked document.
As a rule-of-thumb, use this code for external links – where the target page is on a different site. That way, your site won’t disappear from the user’s radar.
For internal links, you normally avoid doing this. Users can then seamlessly move between pages without generating large numbers of open tabs.
3. No-Follow Link
Use “nofollow” selectively. The source site normally doesn’t gain anything from no-following links.
You may need to use “nofollow” to avoid Google penalizing your site for things like having lots of paid-for links. Follow the link in the text above (no pun intended) for more information. The article also covers “sponsored” and “ugc” (short for User-Generated Content) attributes, which are similar to “nofollow”.
4. Link from an Image
You can create a clickable image by placing the image code inside the link code, as in the above example.
Essentially, the image code goes in place of the anchor text. Search engines then recognise the alt tag for the image as the anchor text for the link.
5. Internal Link
With internal links, which never leave the website, you can shorten the target URL in the HTML code. You don’t need HTTPS or the domain name. Just start with the slash that follows the domain name in the URL.
A relative link is different from an absolute link, where you simply specify the URL’s full path – as we’ve done in all previous examples.
Using relative links has pros and cons, though the choice probably doesn’t matter all that much under normal circumstances.
6. Within-Page Link
Using the id attribute is handy for skipping to certain places on a page, such as when you place a table of contents at the top of a long page.
The id attribute can be applied to different types of HTML code. Common ones are a paragraph (e.g. <p id=”para1″>), a heading tag (e.g. <h2 id=”my-heading”>) and a div tag (e.g. <div id=”section3″>).
The URL link with the trailing hash code can be used both within the page, or from other pages and websites. If linking from the same page, you can use a short relative link (e.g. <a href=”#this-paragraph”>go to para</a>).
7. Download Link
A download link is a hyperlink that, when clicked, allows the user to download a file from the internet. The file can be of any type, such as an image, document, or program.
The href
attribute of the <a>
tag is used to specify the location of the file to be downloaded. The download
attribute can also be used to specify a name for the downloaded file, instead of using the original file name.
For example, the following code creates a link to download a file named “example.pdf”:
<a href="example.pdf" download>Download example.pdf</a>
When clicked on, the user’s browser will prompt them to save the file “example.pdf” to their computer.
Keep in mind that in order for the file to be downloaded, the file must be stored on a web server and accessible via a URL.
Web Pages Other Sites Link To
Certain types of web pages other webmasters like to link to, whereas others may be ignored. Gaining incoming links is important to make your website prominent in search results. Key examples of linkable web pages include the following.
- Informative: These pages provide valuable information on a specific topic and are often well-researched, well-written, and well-organized. They may include things like how-to guides, tutorials, reviews, and other types of educational content.
- News: Pages with breaking news or updates on current events. They may include stories, articles, or reports on a wide range of topics.
- Resource page: A web page with useful resources, such as tools, templates, or guides that can help users with a specific task or process.
- Entertainment: A page providing a form of entertainment, such as videos, games, music, or images. They are often shared and linked to by other websites or social media.
- Authority: A web page considered a reliable source of information. They are often linked to by other websites in the same industry or niche. Such a page is often written by an expert with a good reputation in their field.
- Social: These pages are often linked to by other websites because they have a large following or a good reputation on social media platforms. They include blogs, social media profiles, or any other pages that are updated frequently, have a high number of followers, or are interactive.
- E-commerce: A page may be often linked to by other websites because it provides a way to purchase products or services online. They include pages from retail websites, online marketplaces, or any other pages that facilitate online sales.
Offering unique content that people want to cite is the best way to gain dofollow backlinks naturally. Here’s an example of information people want to cite. “According to the World Wildlife Fund, the African Elephant population has decreased by over 111,000 in the last decade (Source: World Wildlife Fund, “African Elephant Population Declines by 111,000 in a Decade,” November 2020).”
Having too many outbound links on a website can negatively affect its search engine ranking. If these links appear to be unnatural or excessive, search engines may consider them as spam and penalize the website accordingly.