# Set the height and width of an image using percent with CSS

CSSWeb DevelopmentFront End Technology

To set the height and width of an image using %, you can try to run the following code −

## Example

Live Demo

<!DOCTYPE html>
<html>
<style>
img {
height: 50%;
width: 50%;
}
</style>
</html>