Computer Applications

Raveena wants to insert an image on her web page and align it in the center. She has written the following code to center-align the image, but the desired result is not displayed. Can you tell her what is wrong with her code?

<IMG Src= "SAVETIGER.GIF" Align= "Center">

HTML Advanced Features

7 Likes

Answer

The Align attribute cannot be used to center-align the image horizontally. The middle value of align attribute center aligns the image vertically with the current line but not horizontally. It can be done by using the Center element. Thus, the HTML code should be as follows:

<CENTER>
<IMG Src= "SAVETIGER.GIF">
</CENTER>

Answered By

5 Likes


Related Questions