Floating Image In Html. Let the first letter of a paragraph float to the left and style the letter. In this example we include the image tag in our html file but identify the image with an id hp.

The float property can have one of the following values. Floating images allow one to position an image to the left or the right of the content that follows the image in your html file. Right the element floats to the right of its container.
Let an image with a caption float to the right.
Positioning and aligning images on an html page is crucial to layout the page. You can try to run the following code to use floating image in html. The following will explain horizontally aligning images and floating images around text. An image with a caption that floats to the right.