JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    <span id="span">Some text to widen span</span>
    <img src="https://www.google.dk/logos/2012/mothersday12-res.png" id="image">
</body>

JavaScript

$(function(){
  $("body")
    .append("<p>Span width: " + $("#span").width() + "</p>")
    .append("<p>Span innerWidth: " + $("#span").innerWidth() + "</p>")
    .append("<p>Span outerWidth: " + $("#span").outerWidth() + "</p>")
    .append("<p>Image width: " + $("#image").width() + "</p>")
    .append("<p>Image innerWidth: " + $("#image").innerWidth() + "</p>")
    .append("<p>Image outerWidth: " + $("#image").outerWidth() + "</p>");
});