Tuesday, January 1, 2019

A floating image

A floating image:- 


<html>
<body>

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

<p>
<img src="sad.gif" alt="Sad face" style="float:right;width:45px;height:45px;">
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="sad.gif" alt="Sad face" style="float:left;width:45px;height:45px;">
A paragraph with a floating image. A paragraph with a floating image. A paragraph with a floating image.
</p>

</body>
</html>

OUTPUT:-    


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

No comments:

Post a Comment

Internal Javascripts

Internal Javascripts :    The script code can be written directly into the HTML document. script code is placed in header of the docume...