- Home
- /
- CSS Images
CSS Tutorial
Introduction
CSS Properties
CSS Designing
CSS Advance Topics
CSS FAQs
- Home
- /
- CSS Images
CSS Images
Images bring life to a website. With just a few lines of HTML and CSS, you can resize, shape, filter, and make them responsive.
Basic Image Tag
Basic Image Example
src
points to the image location.alt
is the text shown if the image doesn’t load.
Image Size (Inline & CSS)
Inline Style
Inline Image Sizing
CSS Styling
CSS Styled Image
Rounded Corners with Border Radius
Want curved edges or circular images? Use border-radius
.
Rounded Image
For a circular image:
Circular Image
Responsive Image
Responsive images adjust automatically based on screen size. This ensures the image resizes proportionally across desktops, tablets, and mobiles.
Responsive Image
Fit Content, Max Content, Min Content
fit-content
: Element takes the size of its content, but not more.max-content
: Expands fully to fit content, possibly stretching the containmin-content
: Shrinks to fit the smallest required space.
Image Size Content


Image Opacity
You can make an image transparent or semi-transparent with opacity
.
Opacity Example
Image Filters
Filters let you add artistic effects to images using just CSS.
Grayscale
Turn your image black & white:
Grayscale Image
Blur
Add a soft blur effect:
Blur Image
Brightness
Make the image lighter or darker:
Bright Image
Contrast
Increase or decrease contrast:
Contrast Image
Invert
Invert the colors of an image:
Invert Image
Saturate
Boost or lower the color intensity:
Saturate Image
Hue Rotate
Shift the entire color spectrum of the image:
Hue Rotate Image