Aligning images

Aligning images

<!DOCTYPE html>
<html>
<body>

<h4>Image with default alignment (align="bottom"):</h4>
<p>This is some text. <img src="smiley.gif" alt="Smiley face" width="32" height="32"> This is some text.</p>

<h4>Image with align="middle":</h4>
<p>This is some text. <img src="smiley.gif" alt="Smiley face" align="middle" width="32" height="32"> This is some text.</p>

<h4>Image with align="top":</h4>
<p>This is some text. <img src="smiley.gif" alt="Smiley face" align="top" width="32" height="32"> This is some text.</p>

<p><b>Note:</b> The align attribute is deprecated in HTML 4, and is not supported in HTML5. Use CSS instead.</p>

</body>
</html>

Output

Image with default alignment (align="bottom"):

This is some text.  This is some text.

Image with align="middle":

This is some text.  This is some text.

Image with align="top":

This is some text.  This is some text.

Note: The align attribute is deprecated in HTML 4, and is not supported in HTML5. Use CSS instead.

ليست هناك تعليقات:

إرسال تعليق