HTML a Tag Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link's destination. This attribute determines where the user is directed upon clicking the link. HTML <a href="https://www.geeksforgeeks.org//html/html-tutorial/"> html tutorial </a> Syntax:<a href = "link"> Link Name </a> By default, links appear as follows in all browsers:Unvisited links: Underlined and blue.Visited links: Underlined and purple.Active links: Underlined and red.1. Opening Links in New Tab:To open a link in a new browser Tab, add the target="_blank" attribute: HTML <a href="https://www.geeksforgeeks.org/" target="_blank">GeeksforGeeks</a> 2. Linking to Email Addresses and Phone Numbers:To link to an email address: HTML <a href="mailto:[email protected]">Send email</a> To link to a phone number: HTML <a href="tel:+910000000">+910000000</a> 3. Creating Internal Page AnchorsTo link to another section on the same page: HTML <a href="#section1">Go to Section 1</a> 4. Executing JavaScriptTo trigger JavaScript code: HTML <a href="javascript:alert('Hello Geek');">Execute JavaScript</a> Attributes:AttributesDescriptioncharsetIt specifies the character set. It is not supported by HTML 5.downloadIt is used to specify the target link to download when the user clicks.hreflangIt is used to specify the language of the linked document.mediaIt is used to specify the linked media.nameIt is used to specify the anchor name. It is not supported by HTML 5 you can use the global id attribute instead.relIt is used to specify the relation between the current document and the linked document.shapeIt is used to specify the shape of the link. It is not supported by HTML 5.typeIt is used to specify the type of links.targetIt specifies the target link.revIt is used to specify the relation between the linked document and the current document. It is not supported by HTML 5. HTML <a> Tag Comment More info S shivangsharma15 Follow Improve Article Tags : Web Technologies HTML HTML-Tags Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists5 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like