Setting Width and Height of the Image | Images
You can use the style
attribute to specify the width and height of an image.
Width ਅਤੇ Height ਦੀ ਵਰਤੋਂ ਇੱਕ ਤਸਵੀਰ ਦੀ ਚੋੜਾਈ ਅਤੇ ਉਚਾਈ ਸੈੱਟ ਕਰਨ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਇਹਨਾਂ attribute ਦੇ ਮੁੱਲ ਮੂਲ ਰੂਪ ਵਿੱਚ (by default) ਪਿਕਸਲਾਂ (pixels) ਵਿੱਚ ਸੈੱਟ ਹੁੰਦੇ ਹਨ।
<!DOCTYPE html>
<html>
<head>
<title>Setting Width and Height of the Image</title>
</head>
<body>
<h2>Setting Width and Height of the Image</h2>
<h4>ਤਸਵੀਰ ਦੀ ਚੋੜਾਈ ਅਤੇ ਉਚਾਈ ਸੈੱਟ ਕਰਨਾ</h4>
<img src="/media/images/cat.jpg" alt="cat.jpg" width="150" height="110">
<BR><BR>
Width="150"<BR>
Height="110"
<p>you can use percentage (%) too...</p>
<img src="/media/images/cat.jpg" alt="cat.jpg" width="40%" height="30%">
</body>
</html>