{"id":1902,"date":"2012-06-14T09:30:50","date_gmt":"2012-06-14T13:30:50","guid":{"rendered":"http:\/\/www.searchenginegenie.com\/web-design-blog\/?p=1902"},"modified":"2012-09-08T03:05:01","modified_gmt":"2012-09-08T07:05:01","slug":"html5-tutorial-base-element-tag","status":"publish","type":"post","link":"https:\/\/www.searchenginegenie.com\/web-design-blog\/html5-tutorial-base-element-tag\/","title":{"rendered":"HTML5 Tutorial: Base Element Tag"},"content":{"rendered":"<p>The HTML &lt;base&gt; tag is used to specify a base URI, or URL, for relative links. For example, you can set the base URL once at the top of your page, then all subsequent relative links will use that URL as a starting point.<\/p>\n<p>The &lt;base&gt; tag must be between the document&#8217;s &lt;head&gt; tags. Also, there must be no more than one base element per document.<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>Modify the code below, then click &#8220;Update&#8221;. See below for attributes.<\/p>\n<p><em><strong>Source Code<\/strong><\/em><\/p>\n<address><em><span style=\"color: #993300;\">&lt;head&gt;<\/span><\/em><br \/>\n<em><span style=\"color: #993300;\">&lt;base href=&#8221;http:\/\/www.searchenginegenie.com\/javascript\/&#8221; target=&#8221;_blank&#8221; \/&gt;<\/span><\/em><br \/>\n<em><span style=\"color: #993300;\">&lt;\/head&gt;<\/span><\/em><br \/>\n<em><span style=\"color: #993300;\">&lt;body&gt;<\/span><\/em><br \/>\n<em><span style=\"color: #993300;\">&lt;p&gt;Learn about &lt;a href=&#8221;javascript_arrays.cfm&#8221;&gt;JavaScript Arrays&lt;\/a&gt;&lt;\/p&gt;<\/span><\/em><em><span style=\"color: #993300;\">&lt;p&gt;Note: The link above will actually resolve to &lt;i&gt;http:\/\/www.searchenginegenie.com\/javascript\/javascript_arrays.cfm&lt;\/i&gt; regardless of the URL of the current page. This is because the base URL (http:\/\/www.searchenginegenie.com\/javascript\/) is prepended to the (relative) URL indicated in the link (javascript_arrays.cfm)&lt;\/p&gt;<\/span><\/em><br \/>\n<em><span style=\"color: #993300;\">&lt;\/body&gt;<\/span><\/em><\/address>\n<address>\u00a0<\/address>\n<address><strong>Result<\/strong><\/address>\n<address>\u00a0<\/address>\n<address>Learn about <span style=\"text-decoration: underline; color: #0000ff;\">JavaScript Arrays<\/span>Note: The link above will actually resolve to http:\/\/www.searchenginegenie.com\/javascript\/javascript_arrays.cfm regardless of the URL of the current page. This is because the base URL (http:\/\/www.searchenginegenie.com\/javascript\/) is prepended to the (relative) URL indicated in the link (javascript_arrays.cfm)<\/address>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The HTML &lt;base&gt; tag is used to specify a base URI, or URL, for relative links. For example, you can set the base URL once at the top of your page, then all subsequent relative links will use that URL as a starting point. The &lt;base&gt; tag must be between the document&#8217;s &lt;head&gt; tags. Also, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90,5],"tags":[63,146],"class_list":["post-1902","post","type-post","status-publish","format-standard","hentry","category-html","category-web-design-tips","tag-html5","tag-html5-with-css"],"_links":{"self":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/1902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/comments?post=1902"}],"version-history":[{"count":7,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/1902\/revisions"}],"predecessor-version":[{"id":1904,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/1902\/revisions\/1904"}],"wp:attachment":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/media?parent=1902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/categories?post=1902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/tags?post=1902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}