HTML Links
HTML links are used to navigate from one web page to another.
Links are created using the <a> (anchor) tag
and are one of the most important features of the web.
Basic HTML Link
The href attribute specifies the destination of the link.
Visit Example
Open Link in New Tab
The target="_blank" attribute opens the link in a new browser tab.
Open Google in New Tab
Link to Another Page
You can link to another page within the same website using a relative URL.
About Us
Email Links
Use the mailto: scheme to create email links.
Send Email
Phone Links
Phone links allow users to call directly from mobile devices.
Call Us
Image as a Link
You can use an image inside an anchor tag to make it clickable.
Anchor Links (Page Sections)
Anchor links allow navigation to specific sections on the same page.
Go to Contact SectionContact Us
Best Practices for Links
- Use meaningful link text instead of "click here"
- Open external links in a new tab when appropriate
- Always add
rel="noopener noreferrer"withtarget="_blank" - Ensure links are easy to identify and accessible
Common Mistakes with Links
- Missing the
hrefattribute - Using broken or incorrect URLs
- Poor link text that lacks clarity
- Opening too many links in new tabs unnecessarily