JSFiddle - React, Tailwind, and code Playground

HTML

<p>
The DIV with the green border is 600 px wide. The car image is 500px x 334px.
</p>
<div style="width: 600px; border: 1px solid green;">
  <p>
  Image with no CSS.
  </p>
  <img src="https://live.staticflickr.com/102/369476331_aacfc47d95.jpg">
  <p>
  Image with CSS width set to 100%.
  </p>
  <img src="https://live.staticflickr.com/102/369476331_aacfc47d95.jpg" style="width: 100%">
  <p>
  Image with CSS max-width set to 100%.
  </p>
  <img src="https://live.staticflickr.com/102/369476331_aacfc47d95.jpg" style="max-width: 100%">
  <p>
  A 801px x 600px image with CSS max-width set to 100%.
  </p>
  <img src="https://live.staticflickr.com/2466/3877959042_b6b6a469bb_b.jpg" style="max-width: 100%">
</div>