{"id":955,"date":"2011-09-02T12:46:39","date_gmt":"2011-09-02T12:46:39","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/09\/02\/opening-new-window-with-link\/"},"modified":"2021-08-16T23:52:51","modified_gmt":"2021-08-17T03:52:51","slug":"opening-new-window-with-link","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/","title":{"rendered":"Opening a new window with a link"},"content":{"rendered":"<p>Now that we have gone over how to create a basic hyperlink in HTML and covered how to create mailto tags to send email. Sometimes you may want to create an external link to websites. To do this, you may not want your visitors to leave your website but just open a new web browser window with the new link. That way, your visitors do not have to navigate back to your website, they can simply close the web browser window when they are done reviewing your external link.<\/p>\n<p>We will use the link below to make &nbsp;basic hyperlink:<\/p>\n<p class=\"code_block\">&lt;a href=&#8221;nextpage.html&#8221;&gt;Click here for the next page &lt;\/a&gt;<\/p>\n<p>The basic form will remain the same however a few things will change. Since we&#8217;re creating an external link to a website we will need to edit the link in the code. When referencing an external link, you will need the https:\/\/ in front of the full URL.<\/p>\n<p class=\"code_block\">&lt;a href=&#8221;https:\/\/www.separate-domain.com&#8221;&gt;Click here for &nbsp;the next page&lt;\/a&gt;<\/p>\n<p>Now, since we have updated the URL the link will go to, when a visitor click on the link it will take them to the new site but in the same window. To change this, and have a new window open we will use the &#8220;target&#8221; attribute. To open a page in a new window, we will use the target=&#8221;_blank&#8221; attribute. So now if we add the to the above code, it will look like this:<\/p>\n<p class=\"code_block\">&lt;a href=&#8221;https:\/\/www.separate-domain.com&#8221; target=&#8221;_blank&#8221;&gt;Click here for the next page&lt;\/a&gt;<\/p>\n<p>This will now open the link in another browser window. You can change the text to whatever you would like at this point.&nbsp;<\/p>\n<p>Please check the next article on <a href=\"\/support\/website\/anchor-links-create\/\" target=\"_blank\" title=\"Click here to view the next article\" rel=\"noopener noreferrer\">Anchor Links and How to Create Theme<\/a>. If you missed our previous article, please see the <a href=\"\/support\/email\/creating-an-email-link-in-your-webpage\/\" target=\"_blank\" title=\"Click here to view the previous article\" rel=\"noopener noreferrer\"> Creating an Email Link in your Webpage<\/a> tutorial. For more information on this course please visit <a href=\"\/support\/website\/dreamweaver-cs5-how-to-configure-server-settings\/\" target=\"_blank\" title=\"Click here to view the courses\" rel=\"noopener noreferrer\">Inserting Links into a Website<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that we have gone over how to create a basic hyperlink in HTML and covered how to create mailto tags to send email. Sometimes you may want to create an external link to websites. To do this, you may not want your visitors to leave your website but just open a new web browser<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\"> Read More ><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288],"tags":[],"class_list":["post-955","post","type-post","status-publish","format-standard","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to open a new window through a link | InMotion hosting<\/title>\n<meta name=\"description\" content=\"Learn the basics of creating a hyperlink that will open in a new web browser window.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to open a new window through a link | InMotion hosting\" \/>\n<meta property=\"og:description\" content=\"Learn the basics of creating a hyperlink that will open in a new web browser window.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-09-02T12:46:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:52:51+00:00\" \/>\n<meta name=\"author\" content=\"Brad Markle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brad Markle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"Opening a new window with a link\",\"datePublished\":\"2011-09-02T12:46:39+00:00\",\"dateModified\":\"2021-08-17T03:52:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\"},\"wordCount\":352,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\",\"name\":\"How to open a new window through a link | InMotion hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2011-09-02T12:46:39+00:00\",\"dateModified\":\"2021-08-17T03:52:51+00:00\",\"description\":\"Learn the basics of creating a hyperlink that will open in a new web browser window.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Opening a new window with a link\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\",\"name\":\"Brad Markle\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to open a new window through a link | InMotion hosting","description":"Learn the basics of creating a hyperlink that will open in a new web browser window.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/","og_locale":"en_US","og_type":"article","og_title":"How to open a new window through a link | InMotion hosting","og_description":"Learn the basics of creating a hyperlink that will open in a new web browser window.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-09-02T12:46:39+00:00","article_modified_time":"2021-08-17T03:52:51+00:00","author":"Brad Markle","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Brad Markle","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"Opening a new window with a link","datePublished":"2011-09-02T12:46:39+00:00","dateModified":"2021-08-17T03:52:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/"},"wordCount":352,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/","name":"How to open a new window through a link | InMotion hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2011-09-02T12:46:39+00:00","dateModified":"2021-08-17T03:52:51+00:00","description":"Learn the basics of creating a hyperlink that will open in a new web browser window.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/opening-new-window-with-link\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Opening a new window with a link"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf","name":"Brad Markle","url":"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=955"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/955\/revisions"}],"predecessor-version":[{"id":86599,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/955\/revisions\/86599"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}