{"id":16,"date":"2012-04-24T21:16:16","date_gmt":"2012-04-24T21:16:16","guid":{"rendered":"http:\/\/www.w3.org\/community\/html5spec\/?p=16"},"modified":"2012-04-24T21:16:16","modified_gmt":"2012-04-24T21:16:16","slug":"lets-free-a-and-href","status":"publish","type":"post","link":"https:\/\/www.w3.org\/community\/html5spec\/2012\/04\/24\/lets-free-a-and-href\/","title":{"rendered":"Let&#8217;s free A and HREF!"},"content":{"rendered":"<p>Take a look to this example:<\/p>\n<pre>&lt;nav class=\"toolbar\"&gt;\r\n&lt;ul&gt;\r\n\t&lt;li&gt;&lt;a herf=\"index.html\"&gt;Home&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a href=\"about.html\"&gt;About&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a href=\"downloads.html\"&gt;Downloads&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a href=\"contact.html\"&gt;Contact&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a href=\"javascript:bookmark()\"&gt;Bookmark&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\t\r\n&lt;\/nav&gt;\r\n<\/pre>\n<p>\nIsn&#8217;t better if it was possible to be written like this:\n<\/p>\n<pre>&lt;toolbar&gt;\r\n\t&lt;li herf=\"index.html\"&gt;Home&lt;\/li&gt;\r\n\t&lt;li href=\"about.html\"&gt;About&lt;\/li&gt;\r\n\t&lt;li href=\"downloads.html\"&gt;Downloads&lt;\/li&gt;\r\n\t&lt;li href=\"contact.html\"&gt;Contact&lt;\/li&gt;\r\n\t&lt;li href=\"javascript:bookmark()\"&gt;Bookmark&lt;\/li&gt;\t\r\n&lt;\/toolbar&gt;\r\n<\/pre>\n<p>\nor even:\n<\/p>\n<pre>&lt;toolbar&gt;\r\n\t&lt;command herf=\"index.html\"&gt;Home&lt;\/command&gt;\r\n\t&lt;command href=\"about.html\"&gt;About&lt;\/command&gt;\r\n\t&lt;command href=\"downloads.html\"&gt;Downloads&lt;\/command&gt;\r\n\t&lt;command href=\"contact.html\"&gt;Contact&lt;\/command&gt;\r\n\t&lt;command href=\"javascript:bookmark()\"&gt;Bookmark&lt;\/command&gt;\t\r\n&lt;\/toolbar&gt;\r\n<\/pre>\n<p>\nI mean why should I have to add <code>&lt;a&gt;<\/code> tag to every object\/tag I want to link to something? Isn&#8217;t better if I were able to add <code>href=\"\"<\/code> attribute to this object\/tag without using <code>&lt;a&gt;<\/code> tag?\n<\/p>\n<p>\nWhy don&#8217;t we use <code>href=\"\"<\/code> as a <em>global attribute<\/em>?\n<\/p>\n<p>\nLikewise, think of using <code>&lt;a&gt;<\/code> tag without <code>href=\"\"<\/code> when the link name = the link address:\n<\/p>\n<pre>&lt;p&gt;\r\n.., you can download it from &lt;a&gt;http:\/\/example.com\/downloads\/&lt;\/a&gt;.\r\n&lt;\/p&gt;\r\n<\/pre>\n<p>\ninstead of:\n<\/p>\n<pre>&lt;p&gt;\r\n.., you can download it from &lt;a href=\"http:\/\/example.com\/downloads\/\"&gt;http:\/\/example.com\/downloads\/&lt;\/a&gt;.\r\n&lt;\/p&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Take a look to this example: &lt;nav class=&#8221;toolbar&#8221;&gt; &lt;ul&gt; &lt;li&gt;&lt;a herf=&#8221;index.html&#8221;&gt;Home&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;about.html&#8221;&gt;About&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;downloads.html&#8221;&gt;Downloads&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;contact.html&#8221;&gt;Contact&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;javascript:bookmark()&#8221;&gt;Bookmark&lt;\/a&gt;&lt;\/li&gt; &lt;\/ul&gt; &lt;\/nav&gt; Isn&#8217;t better if it was possible to be written like this: &lt;toolbar&gt; &lt;li herf=&#8221;index.html&#8221;&gt;Home&lt;\/li&gt; &lt;li href=&#8221;about.html&#8221;&gt;About&lt;\/li&gt; &lt;li href=&#8221;downloads.html&#8221;&gt;Downloads&lt;\/li&gt; &lt;li &hellip; <a href=\"https:\/\/www.w3.org\/community\/html5spec\/2012\/04\/24\/lets-free-a-and-href\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":891,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"yes","footnotes":""},"categories":[3],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-links"],"_links":{"self":[{"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/users\/891"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":6,"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/posts\/16\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3.org\/community\/html5spec\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}