I am facing a challenge where I want to embed an image inline with text, while ensuring that it matches the height of the text. I have tried using
<img src="img.jpg" height=16>
and also <img src="img.jpg" height="100%">
, but the former does not adjust to the text size and the latter ends up matching the size of the div instead of the text height. Can anyone provide a solution for this?
Here is an example of the HTML code:
<body>
This is a test <img src="img.jpg">
</body>