Javatpoint Logo
Javatpoint Logo

Convert an Image into Grayscale Image using HTML/CSS

In this article, we will go through how to create a grayscale version of an image.

Having a coloured image, the aim is to convert it to grayscale using CSS properties. To convert an image to grayscale, we mainly use the CSS filter property. The filter feature is mostly used to alter the visual appearance of a picture.

Syntax:

1st Method:

To turn an image to grayscale, apply the filter grayscale(100%).

Output:

Convert an Image into Grayscale Image using HTML/CSS

2nd Method:

Output:

Convert an Image into Grayscale Image using HTML/CSS





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA