How to Open a Hyperlink in Another Window or Tab in HTML? Last Updated : 23 Nov, 2024 Suggest changes Share 4 Likes Like Report In HTML, this can be easily achieved using the 'target' attribute of the anchor ('<a>') tag. By setting 'target="_blank"', you instruct the browser to open the linked document in a new tab or window. This approach is widely used in web development to provide seamless navigation and improve the accessibility of external links or supplementary content.<a target="_blank" rel="relation_name" href="link">Link Name</a>Approach to Open Link in a New TabStart by defining the basic structure of your HTML document with <!DOCTYPE html>, <html>, <head>, and <body> tags.Inside the <head> section, include a <title> tag to provide a title for the document.Within the <body> section, add the content you want to display on the webpage. Use a <p> tag to include any text. Insert the hyperlink using an <a> tag, and set the href attribute to the URL you want to link to.Add the target="_blank" attribute to the <a> tag. This tells the browser to open the link in a new tab when clicked.Syntax<a target="target_name" rel="relation_name" href="link">Link Name</a>Note: Here, the rel attribute is used to describe the relation between the current document and the linked document and the target attribute is used to specify the target link.Example 1: Here, target=”_blank” is used to open a hyperlink in a new tab. HTML <p>A computer science portal for geeks <a target="_blank" href="https://www.geeksforgeeks.org/"> GeeksforGeeks </a> </p> OutputOutputExample 2: Here, rel=”noopener noreferrer” is used as a security measure. HTML <p>A computer science portal for geeks <a target="_blank" rel="noopener noreferrer" href="https://www.geeksforgeeks.org/"> GeeksforGeeks </a> </p> OutputOutput C chaitanyashah707 Follow 4 Article Tags : Web Technologies HTML HTML-Misc HTML-Questions 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 My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like