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
Consider the web page given below and answer the following questions:
- Mention the tags used to create a table pointed by the letter A.
- Which property of
<IMG>
tag is used to wrap the text around the image? - Name the tag and its attributes to set the alignment of text pointed by the letters B and D.
- Name the tag used to create the links pointed by the letter C.
Ayush has to display the sequence of events of the upcoming Annual Sports Day on the school website. Help Ayush in writing the HTML code to generate the following output.
Shagun wants to set different background colours for the individual cells of the table. How can she achieve this?
Shivam has been given an assignment by her class teacher to design a table in such a way that the amount of space between its cell borders and cell data is 5 pixels and distance between any two cells is 3 pixels. Which attributes can she use to accomplish the task?