Breaking News

Html Image Center Alignment Code | Image in Center of Screen

For Inserting an image in a webpage we use "img" tag. Do you know? All tags have different sets of attributes to control the element's behaviour. Html provides attributes for setting the alignment of images on webpages. You can easily give your desired alignment to your image by writing some codes. Let's learn about Html Image Center Alignment Code | Image in Center of Screen.

Html Image Center Alignment Code | Image in Center of Screen by <Center> Tag

Html Image Center Alignment Code | Image in Center of Screen
Html Image Center Alignment Code

Before learning about centre alignment code you should be able to insert image in a webpage. First of all, learn How to insert Image in Html using Notepad. After that, you can start learning about the methods of aligning images to the center of webpages.

But in this post, we will focus on <center> tag. So, to align your image in center you can follow these steps:

  1. Open your HTML code where you placed your <img> Tag.
  2. Then place that <img> tag between <center>--</center> element. as shown below.
    <center><img src="img_chania.jpg" alt="Flowers in Chania" width="460" height="345"></center>
  3. After all this, Save your file again and see the respective output on any browser.
So with this method, one can align image to the center of the webpage.
For any confusion comment us now below.

Also Visit: Jio Giga Fiber Unlimited Plans | Jio landline internet plans

No comments

Please leave your feedback here.