title: How to add an ID to an image using only javascript
body: <p>Basically I'm trying to give my image an id... but I'm not sure if this is possible without using HTML... if you're confused just look at my code</p>
  
  <pre><code>function add_conner_6th() {
      var src = "src";
      show_image("src", 300,415, "Conner 6th");
  }
  
  function show_image(src, width, height, alt) {
      var img = document.createElement("src");
      img.src = src;
      img.width = width;
      img.height = height;
      img.alt = alt;
      document.body.appendChild(img);
  } 
  </code></pre>
  
  <p>I've tried adding img.id = "name" but it just doesn't work. I'M DESPERATE</p>