I have a basic HTML code that consists of an image within a paragraph element.
<p>
<img src="https://www.w3schools.com/css/pineapple.jpg" />
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minus incidunt recusandae quae molestias corporis veniam repellat provident aliquam amet odio cupiditate animi rerum neque voluptates iusto, odit. Numquam, sunt, dicta.
</p>
This is how it appears:
https://i.sstatic.net/bx82Y.png
Now, I am looking to have the image "float" to the end of the first paragraph as shown below:
https://i.sstatic.net/oceVV.png
The current solution involves manually placing the image at the end of the first line within the paragraph, but I wonder if there is a CSS code for achieving this automatically?
My current HTML approach requires inserting the image manually within the paragraph:
<p>
Lorem ipsum dolor sit amet, consectetur
<img src="https://www.w3schools.com/css/pineapple.jpg" />
adipisicing elit. Minus incidunt recusandae quae molestias corporis veniam repellat provident aliquam amet odio cupiditate animi rerum neque voluptates iusto, odit. Numquam, sunt, dicta.
</p>