HTML Links

HTML Links

HTML links are created using the <a> (anchor) tag. Links allow users to navigate from one page to another or open websites, files, email addresses, or sections within the same page.

The main attribute used in links is href, which specifies the destination URL.


Basic Link Example


 

Output:
👉 Visit Google (clickable link)


Open Link in a New Tab

Use the target="_blank" attribute:


 


Email Link


 


Phone Link (Mobile Friendly)


 


Link to Another Page in Same Website


 


Link with Tooltip (title Attribute)


 


Internal Page Jump (Bookmark Link)


 


Summary of Useful Link Attributes

Attribute Purpose
href Link destination
target="_blank" Open link in new tab
title Tooltip text
mailto: Email link
tel: Phone link

HTML links help users move around websites and access important information quickly.

CodeCapsule

Sanjit Sinha — Web Developer | PHP • Laravel • CodeIgniter • MySQL • Bootstrap Founder, CodeCapsule — Student projects & practical coding guides. Email: info@codecapsule.in • Website: CodeCapsule.in

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *