Filter (Advanced Search)
Video

Video is not available... Embedded is previous playlist.

Details

Use the CSS float property to let the image float to the right or to the left of a text:


<!DOCTYPE html>
<html>
<head>
<title>Floating Images</title>
</head>
<body>

<h2>Floating Images</h2>
<p><strong>Float the image to the right:</strong></p>

<p>
<img src="/images/smiley.gif" alt="Smiley face" style="float:right;width:42px;height:42px;">
A paragraph with a floating image. A paragraph with a floating image. A paragraph with a floating image.
</p>

<p><strong>Float the image to the left:</strong></p>
<p>
<img src="/images/smiley.gif" alt="Smiley face" style="float:left;width:42px;height:42px;">
A paragraph with a floating image. A paragraph with a floating image. A paragraph with a floating image.  
</p>

</body>
</html>



Ad
Added to Favorite
Removed from Favorite