title: Hot to get the attribute from .getElementsByTagName?
body: <p>Do not undertand why I can not get the <strong>attribute value</strong> of tag element by using function <code>getElementsByTagName</code>. </p>
  
  <p>Also I have no problems with using direct acsess to the element by <code>id</code> , like <code>t.getAttribute('href')</code> from <code>&lt;a id="t"&gt;.&lt;/a&gt;</code> </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> var a = document.body.getElementsByTagName('a').getAttribute('href');
      console.log(a);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;a href="###"&gt;http://internal.com/&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>