title: How do I insert an image into HTML with Javascript
body: <p>I'd like to make an img visible but not with the  tag but Javascript.How can I make the function work somehow? </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
    &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;PingPongKép&lt;/title&gt;
      &lt;link rel="stylesheet" href="CSS/style.css"&gt;
    &lt;/head&gt;
  &lt;body&gt; 
   &lt;script&gt;
       function ilonaKep(){
         var ilona = document.createElement ("IMG");
         x.setAttribute ("src", "img/ilona.jpg");
       }     
      &lt;/script&gt;
      &lt;p&gt;Let's See the image&lt;/p&gt;
      &lt;script&gt;
        ilonaKep();
      &lt;/script&gt;
     &lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>