How to Flip Images Horizontally With HTML Code

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Flipping an image horizontally is as simple as adding a style attribute to your HTML code.

If you want to flip an image horizontally on your website, you don't even have to open an image editor. You can use HTML to quickly and easily flip an image to create a mirror effect. This technique is also useful when you want the picture to appear in reverse without altering the original image.


Step 1

Open your HTML editor. Find the line of code for the image you want to flip. It should look something like this:

Video of the Day

Step 2

Add the following style attribute to your image code: style="filter:FlipH." Your image tag should now appear similar to this:


Step 3

Save the document. The image will now appear in reverse on your website.




Report an Issue

screenshot of the current page

Screenshot loading...