title: How to define a img tag inside a React.createElement() in React?
body: <p>Learning react and came across a scenario where I would want to define a 'img' tag inside React.createElement(). I have tried below syntax, but I am sure its a wrong method:</p>
  <pre><code>function Greeting() {
    return (
      &lt;div&gt;
        &lt;Person /&gt;
        &lt;Message /&gt;
      &lt;/div&gt;
    );
  }
  
  const Person = () =&gt; {
    &lt;h2&gt;Its an Image&lt;/h2&gt;;
  
    return React.createElement(
      &quot;img&quot;,
      {},
      &quot;https://images-eu.ssl-images-amazon.com/images/I/81l3rZK4lnL._AC_UL200_SR200,200_.jpg&quot;
    );
  };
  </code></pre>
  <p>The error which I get is as below:</p>
  <pre><code>Error: img is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.
  ▶ 15 stack frames were collapsed.
  Module.&lt;anonymous&gt;
  E:/REACT_APP/tutorial/src/index.js:43
  40 | return &lt;p&gt;Follow the white rabbit &lt;/p&gt;;
  41 | };
  42 | 
  &gt; 43 | ReactDom.render(&lt;Greeting /&gt;, document.getElementById(&quot;root&quot;));
  44 | 
  </code></pre>
  <p>Please suggest,</p>