In this article, we’ll explore various types of links commonly used in web development. Links are essential for navigating websites, and knowing how to implement different types can greatly enhance the user experience. Let’s look at a few examples.
Basic hyperlink
A basic hyperlink is used to link external or internal pages. Here’s an example of a simple link to a portfolio:
Visit portfolio
Open Link in a New Tab
If you want to open a link in a new tab or window, add target="_blank" to the anchor tag. This ensures the user’s current page stays open while the link opens in a new tab.
Visit portfolio new tab
Internal Link to Same Website
To link to other content on the same website, simply use the relative path of the page:
Visit portfolio new tab
Phone call
You can enable a phone call by clicking a link. This is particularly useful for mobile-friendly websites:
Call me
SMS link
Similarly, an SMS link allows users to send a text message. Here’s the basic format:
SMS me
For Android, you can pre-fill the SMS body content:
SMS me
For iPhone (iOS), the format is slightly different:
SMS me
WhatsApp link
To send a message via WhatsApp, you can create a link that opens the WhatsApp app with pre-filled text:
WhatsApp me
Email link
An email link allows users to send an email directly from a website. You can even pre-fill the subject line and body content:
Mail
Conclusion
These various types of links can make your website more interactive and user-friendly. From basic navigation to making phone calls or sending messages, these techniques are useful for improving user experience.
Learn to add Fixed CTA (with free source code)