Computer Science, asked by goraisunil011, 1 month ago

What is wrong with the
following : <IMG SRC = "ABC.GIF" Align= Center>

Answers

Answered by chandravasu004
1

THE CORRECTION IS IN BOLD FORMAT

<IMG SRC="ABC.GIF" ALIGN=CENTER>

IT IS IN THE BOLD FORMAT SO IT IS THE WRONG WITH THIS QUESTION

Explanation:

<IMG SRC="ABC.GIF" ALIGN=CENTER>

Answered by ruchibs1810
0

Answer:

The HTML code you provided is using the deprecated attribute "Align" to center the image horizontally. The correct way to center an image in HTML5 is to use the "text-align" property in CSS.

Here's an updated version of the code that centers the image using CSS:

<img src="ABC.GIF" style="display:block; margin:auto;">

This code sets the image's display property to block, which allows us to set a margin of auto on both sides. This will center the image horizontally in its container.

Explanation:

Frankly in HTML, the "align" attribute was used to specify the horizontal alignment of an image or text within an element. However, this attribute has been deprecated in HTML5, which means that it is no longer recommended to use it in modern web development.

Instead, it is recommended to use CSS to style and position HTML elements. In the case of centering an image horizontally, the recommended approach is to use the "text-align" property in CSS to center the image within its container.

Here's an example of how you can center an image using CSS:

<div style="text-align: center;">

 <img src="ABC.GIF">

</div>

This code creates a container div and sets its "text-align" property to "center". The image is then placed inside the container div, and it will be centered horizontally because of the parent div's text alignment.

Using CSS for styling and positioning elements is more flexible and powerful than using HTML attributes like "align". It allows for more precise control over the appearance and behavior of web pages, and it is the recommended approach for modern web development

Learn more about HTML: https://brainly.in/question/2500440

Learn more about CSS: https://brainly.in/question/13312150

#SPJ3

Similar questions