img css size code example
Example 1: resize image html
Simple img tag
<img src="image_path" alt="Image Sample">
With height and width attribute
<img src="image_path" width="200" height="40" alt="Image Sample">
Example 2: css image size adjust
squareImage {
border: 1px solid #ddd; /* thickness and color of border */
border-radius: 4px; /* edge rounding of border */
width: 150px; /* width of image (px or % or auto) */
height: auto; /* height of image (px or % or auto) */
}
Example 3: image size css
img {
width: width;
height: height;
}
Example 4: CSS shrink image
<div style="width: 200px; height: 200px;">
<img src="imagen\imagen1.jpg" style="width: 100px; height: 100px;"/>
</div>