title: How do I make 2 images appear side by side in Jupyter notebook (iPython)?
body: <p>I want to display 2 PNG images in iPython side by side.</p>
  
  <p>My code to do this is:</p>
  
  <pre><code>from IPython.display import Image, HTML, display
  
  img_A = '\path\to\img_A.png'
  img_B = '\path\to\img_B.png'
  
  display(HTML("&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;img src=img_A&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=img_B&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"))
  </code></pre>
  
  <p>But it doesn't output the images, and instead only displays placeholders for the 2 images:</p>
  
  <p><a href="https://i.stack.imgur.com/68urF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/68urF.png" alt="enter image description here"></a></p>
  
  <p>I tried the following as well:</p>
  
  <pre><code>s = """&lt;table&gt;
  &lt;tr&gt;
  &lt;th&gt;&lt;img src="%s"/&gt;&lt;/th&gt;
  &lt;th&gt;&lt;img src="%s"/&gt;&lt;/th&gt;
  &lt;/tr&gt;&lt;/table&gt;"""%(img_A, img_B)
  t=HTML(s)
  display(t)
  </code></pre>
  
  <p>But the result is the same:</p>
  
  <p><a href="https://i.stack.imgur.com/f66WY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/f66WY.png" alt="enter image description here"></a></p>
  
  <p>The images are in the path for sure, because I verified by displaying them in a pop up:</p>
  
  <pre><code>plt.imshow(img_A)
  plt.imshow(img_B)
  </code></pre>
  
  <p>and they do appear in the pop ups.</p>
  
  <p>How do I make the 2 images appear side by side in iPython?</p>