{"id":255,"date":"2018-08-23T00:13:40","date_gmt":"2018-08-23T00:13:40","guid":{"rendered":"http:\/\/www.projectimmerse.com\/?p=255"},"modified":"2020-06-17T08:43:19","modified_gmt":"2020-06-17T08:43:19","slug":"the-target-parent-html-attribute","status":"publish","type":"post","link":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/","title":{"rendered":"The target parent HTML attribute"},"content":{"rendered":"<p>I love HTML. Love it so much I like to write about it in its purest form. Even attributes people don&#8217;t think about or won&#8217;t dedicate a single post too. I can&#8217;t count how many times I&#8217;ve used HTML&#8217;s target attribute in my development career. Everyone&#8217;s talking about concepts, frameworks, paradigm shifts and all that. I&#8217;d like to talk about the target attribute.<\/p>\n<p>_parent isn&#8217;t used all too often in my experience, so I&#8217;m going to use it in my example below.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;a href=&quot;\/some-page.html&quot; title=&quot;The Title of this Hyperink&quot; target=&quot;_parent&quot;&gt;HyperLink&lt;\/a&gt;\r\n\r\n<\/pre>\n<p><!--more--><\/p>\n<h2>_parent is one value we can use, there are others<\/h2>\n<ul>\n<li>_blank &#8211; Opens the linked document in a new window or tab<\/li>\n<li>_self &#8211; Opens the linked document in the same frame as it was clicked (this is default)<\/li>\n<li>_parent &#8211; Opens the linked document in the parent frame<\/li>\n<li>_top &#8211; Opens the linked document in the full body of the window<\/li>\n<li>framename &#8211; Opens the linked document in a named frame<\/li>\n<\/ul>\n<p>Of the all the values listed above, I&#8217;ve used &#8220;_blank&#8221; the most. You&#8217;ll see a mixture of these utilized when using iframes. Iframes are still pretty relevant nowadays, browsers have done their work in terms of security. I&#8217;m not going to go off tangent with the subject of iframes, that deserves it&#8217;s own post. <\/p>\n<p>Back to the _parent attribute &#8211; I was working on a site where I built a dynamic interactive map and embedded it into a wordpress site. I automatically assumed interlinking would work out of the box, but I ran into an issue where iframes were overlapping, self replicating itself every time a link was clicked within that iframe. See if I was linking to an external site like http:\/\/google.com for instance, this wouldn&#8217;t be a problem. <\/p>\n<p>I would just implement the _blank attribute. See below. <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;-- this would open a new tab on your browser --&gt; \r\n&lt;a href=&quot;\/some-page.html&quot; title=&quot;The Title of this Hyperink&quot; target=&quot;_blank&quot;&gt;HyperLink&lt;\/a&gt;\r\n\r\n<\/pre>\n<p>But what if I wanted to keep everything intact? What I mean is, let the browser know that I&#8217;m still on the same website while clicking within the iframe. The website and iframe can be seen as two different entities, they need a way to know that they co exist. <\/p>\n<p>The _parent attributes allows us to bridge this gap, by emulating a parent child relationship between the two &#8211; the website being the parent and the iframe being sort of like a child. So the parent attribute does exactly that, creates an identifier for the iframe to look at. <\/p>\n<p>HTML always has a way of surprising me in the simplest of ways and this is a good example of it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I love HTML. Love it so much I like to write about it in its purest form. Even attributes people don&#8217;t think about or won&#8217;t dedicate a single post too. I can&#8217;t count how many times I&#8217;ve used HTML&#8217;s target attribute in my development career. Everyone&#8217;s talking about concepts, frameworks, paradigm shifts and all that. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The target parent HTML attribute&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1163,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[21],"class_list":["post-255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development","tag-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The target parent HTML attribute - Project Immerse<\/title>\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.projectimmerse.com\/blog\/the-target-parent-html-attribute\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The target parent HTML attribute - Project Immerse\" \/>\n<meta property=\"og:description\" content=\"I love HTML. Love it so much I like to write about it in its purest form. Even attributes people don&#8217;t think about or won&#8217;t dedicate a single post too. I can&#8217;t count how many times I&#8217;ve used HTML&#8217;s target attribute in my development career. Everyone&#8217;s talking about concepts, frameworks, paradigm shifts and all that. &hellip; Continue reading &quot;The target parent HTML attribute&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/\" \/>\n<meta property=\"og:site_name\" content=\"Project Immerse\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-23T00:13:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-17T08:43:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/08\/html-attribute-target-blank.png\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alex Mercer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex Mercer\" \/>\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.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/\"},\"author\":{\"name\":\"Alex Mercer\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"headline\":\"The target parent HTML attribute\",\"datePublished\":\"2018-08-23T00:13:40+00:00\",\"dateModified\":\"2020-06-17T08:43:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/\"},\"wordCount\":500,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/html-attribute-target-blank.png\",\"keywords\":[\"HTML\"],\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/\",\"name\":\"The target parent HTML attribute - Project Immerse\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/html-attribute-target-blank.png\",\"datePublished\":\"2018-08-23T00:13:40+00:00\",\"dateModified\":\"2020-06-17T08:43:19+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/html-attribute-target-blank.png\",\"contentUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/html-attribute-target-blank.png\",\"width\":750,\"height\":750,\"caption\":\"The target parent HTML attribute\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/the-target-parent-html-attribute\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The target parent HTML attribute\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\",\"name\":\"Project Immerse\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\",\"name\":\"Alex Mercer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/alex-mercer-author-150x150.png\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/alex-mercer-author-150x150.png\",\"contentUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/alex-mercer-author-150x150.png\",\"caption\":\"Alex Mercer\"},\"description\":\"Alex Mercer is a writer and contributor at Project Immerse, covering web design, WordPress, web development, SEO, digital strategy, emerging technology, and the evolving world of the web. His work focuses on practical ideas, useful tools, and approachable guidance that help creators, developers, and business owners build better digital experiences. Alex writes with a hands-on, curiosity-driven approach, exploring both established web practices and new technologies shaping how websites are designed, built, and discovered.\",\"sameAs\":[\"https:\\\/\\\/www.projectimmerse.com\"],\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/author\\\/projectimmerse\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The target parent HTML attribute - Project Immerse","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.projectimmerse.com\/blog\/the-target-parent-html-attribute\/","og_locale":"en_US","og_type":"article","og_title":"The target parent HTML attribute - Project Immerse","og_description":"I love HTML. Love it so much I like to write about it in its purest form. Even attributes people don&#8217;t think about or won&#8217;t dedicate a single post too. I can&#8217;t count how many times I&#8217;ve used HTML&#8217;s target attribute in my development career. Everyone&#8217;s talking about concepts, frameworks, paradigm shifts and all that. &hellip; Continue reading \"The target parent HTML attribute\"","og_url":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/","og_site_name":"Project Immerse","article_published_time":"2018-08-23T00:13:40+00:00","article_modified_time":"2020-06-17T08:43:19+00:00","og_image":[{"width":750,"height":750,"url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/08\/html-attribute-target-blank.png","type":"image\/png"}],"author":"Alex Mercer","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Alex Mercer","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#article","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/"},"author":{"name":"Alex Mercer","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"headline":"The target parent HTML attribute","datePublished":"2018-08-23T00:13:40+00:00","dateModified":"2020-06-17T08:43:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/"},"wordCount":500,"commentCount":0,"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/08\/html-attribute-target-blank.png","keywords":["HTML"],"articleSection":["Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/","url":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/","name":"The target parent HTML attribute - Project Immerse","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#primaryimage"},"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/08\/html-attribute-target-blank.png","datePublished":"2018-08-23T00:13:40+00:00","dateModified":"2020-06-17T08:43:19+00:00","author":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"breadcrumb":{"@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#primaryimage","url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/08\/html-attribute-target-blank.png","contentUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/08\/html-attribute-target-blank.png","width":750,"height":750,"caption":"The target parent HTML attribute"},{"@type":"BreadcrumbList","@id":"https:\/\/www.projectimmerse.com\/blog\/the-target-parent-html-attribute\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.projectimmerse.com\/blog\/"},{"@type":"ListItem","position":2,"name":"The target parent HTML attribute"}]},{"@type":"WebSite","@id":"https:\/\/www.projectimmerse.com\/blog\/#website","url":"https:\/\/www.projectimmerse.com\/blog\/","name":"Project Immerse","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.projectimmerse.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5","name":"Alex Mercer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2026\/09\/alex-mercer-author-150x150.png","url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2026\/09\/alex-mercer-author-150x150.png","contentUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2026\/09\/alex-mercer-author-150x150.png","caption":"Alex Mercer"},"description":"Alex Mercer is a writer and contributor at Project Immerse, covering web design, WordPress, web development, SEO, digital strategy, emerging technology, and the evolving world of the web. His work focuses on practical ideas, useful tools, and approachable guidance that help creators, developers, and business owners build better digital experiences. Alex writes with a hands-on, curiosity-driven approach, exploring both established web practices and new technologies shaping how websites are designed, built, and discovered.","sameAs":["https:\/\/www.projectimmerse.com"],"url":"https:\/\/www.projectimmerse.com\/blog\/author\/projectimmerse\/"}]}},"_links":{"self":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":3,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":455,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/255\/revisions\/455"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media\/1163"}],"wp:attachment":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}