Class 10 HTML Worksheet: The <img> (Image) Tag
Part A: Fill in the Blanks
- The <img>tag is used to display __________ on a webpage.
- The srcattribute of the<img>tag specifies the __________ of the image file.
- The __________ attribute is used to describe the image, providing alternative text if the image fails to load.
- The widthandheightattributes of the<img>tag are used to specify the __________ of the image.
- The <img>tag is a __________ element, meaning it doesn't require a closing tag.
Part B: True or False
- The <img>tag requires a closing</img>tag. (True / False)
- The srcattribute is mandatory for the<img>tag to function properly. (True / False)
- The altattribute is used to provide a textual description of an image. (True / False)
- You can change the size of an image using the widthandheightattributes. (True / False)
- The <img>tag can only be used inside the<body>section of an HTML document. (True / False)
Part C: Short Answer Questions
- What is the purpose of the <img>tag in HTML?
- Write the HTML code to display an image named flower.jpgwith a width of 300 pixels and a height of 200 pixels.
- Explain the significance of the altattribute in the<img>tag.
- How can you link an image to another webpage using the <img>tag? Write an example.
- What happens if the image file specified in the srcattribute is not found? How does the browser handle this situation?
Part D: Practical Exercises
- Create an HTML document that displays three images: - A photo named mountain.jpgwith a width of 400 pixels and a height of 300 pixels.
- A second photo named lake.jpgwith a width of 200 pixels and no height specified.
- A third image named forest.jpgwith alternative text "Beautiful Forest" in case the image fails to load.
 
- A photo named 
- Write the HTML code to display an image named - logo.pngthat links to the website "https://www.example.com" when clicked.
- Create an HTML page that includes an image of your choice and resizes it using both the - widthand- heightattributes. Use the- altattribute to provide a meaningful description of the image.
Part E: Code Correction
Examine the following HTML code and correct the mistakes related to the <img> tag. Rewrite the correct code.
<!DOCTYPE html>
<html>
<head>
  <title>Image Example</title>
</head>
<body>
  <img src="mypicture.jpg" width="300px" height="200px">
  <img src="flower.jpg" alt=Beautiful Flower">
</body>
</html>
.png)


 

 
 
 
.png) 
 
 
![[Get Rs.100 Free] Offer For Online Poker Player](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzXLcF-w-HtHQE6E2dS1wVn1txZ27o_qu8YgBMAu70IeovgwJ4GBuOIltWxwf495mQtBdC0u6oYfirIWqNoXx6x4fEE8neGZmGM5wxfcxkPuh5HaoqtK-Npg_4mD7epC4BuLx9jpd24Yo/w72-h72-p-k-no-nu/poker.png) 
![[100 % working] Just Give A miss call and win Talktime](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-4CaKjkyp8P7Buew47GZDOXZC_lJuMIF4s5w9sCieZbOdC0Aytf0m32vFp_iWIZ96nftYkPF-OAbrvaDAeMVbWbkjnnxjOwACAXYGB2HnV9YnTxUnXv96mkvhTAK9b3owgAqj2ieFlhU/w72-h72-p-k-no-nu/wheel-free.jpg) 
![[DATAFRAME ] Class XII access rows and columns using different methods](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkvbjaJszFdO7lTRSlbccJkxyx-n0_KM97rhYHNEcVoezQZdPf-dnzTlWXNU0U4J0c5WmMv308WKGt5Fr6pMggk5R0TgaCB8ZTY05oZm1YaQNnZ8o8zEB4viV9StYL-_tqah8RksTBiOrPj2RrGaQgMD5wVWZtOlxiXPlGeDhzVPuFtgmNRpLhpAprSo/w72-h72-p-k-no-nu/Professional%20LinkedIn%20Banner%20(1).png) 
.png) 
 
![[loot offer ] Ambrane 10000 Power Bank at Rs 299 only](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSMWWKl7yDLLwW7qnTng-eTC9ZBEn0E1PbxqkFWpY_fqiNt3hZHRcNa9tIKdtgZ_AfOreCTglryboUlJ3EM4lnU9d6B1QIEPyo04Gt0p0kONs5F_dBizVsKsYIks1rmS9Zo55FWmHuiQtsdkKgEWPQ36FD8Twj9MnpY7zyxq3FIzwM67kn24G-hCtT/w72-h72-p-k-no-nu/power.png) 
.png) 
 
![[Loot Offer]Sandisk Cruzer Blade 16 GB Pendrive @ Rs 79 only](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3gEAiqlZckmgvmXrYOiGF8oVOLt9wlu4B6IWWEd7SARfF4rSdyQ56bl4aIV3UXrEiTjKdWD-kaofdfoMBn_yHHrR8uqC0LVpmgV-nLPYtVtwrKEPwVnYU05h_gnTnz3PcVGioULXyjQBd/w72-h72-p-k-no-nu/ebay.jpg) 
 
.png) 
 
0 Comments
Please do note create link post in comment section