How to Move Image in Html

To reposition an image in HTML, we need to adhere to the following steps outlined below. By following these instructions, it is possible to effortlessly relocate an image.

To begin, the initial step involves entering the HTML code into a text editor or accessing the current HTML file in a text editor where the image relocation is intended.

Example

<!Doctype Html>

<Html>   

<Head>    

<Title>   

Move an Image

</Title>

</Head>

<Body> 

Hello User!... <br> <center>

<img src="https://placehold.co/400x300/9b59b6/ffffff?text=Logo" width="100" height="100" > </center>

</Body> 

</Html>

Step 2: Next, position the cursor in front of the <img> element within the image that needs to be relocated. Subsequently, input the <marquee> element. The marquee element is employed to animate content on a webpage.

Example

<marquee>

<img src="https://placehold.co/400x300/34495e/ffffff?text=Logo" width="100" height="100" >

Step 3: Following the opening <img> tag, it is necessary to properly close the corresponding <marquee> tag.

Example

<marquee>

<img src="https://placehold.co/400x300/34495e/ffffff?text=Logo" width="100" height="100" > </marquee>

Step 4 requires saving the HTML file and subsequently opening it in a web browser to view the content.

Example

<!Doctype Html>

<Html>   

<Head>    

<Title>   

Move an Image

</Title>

</Head>

<Body> 

Hello User!... <br> <center>

<marquee>

<img src="https://placehold.co/400x300/9b59b6/ffffff?text=Logo" width="100" height="100" > </marquee> </center>

</Body> 

</Html>

The image below displays the result generated by the HTML code above:

Input Required

This code uses input(). Please provide values below: