HTML Questions & Answers – Optimization of Images

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “Optimization of Images”.

1. Which of the following gives a text description of the image if it is not available?
a) alt
b) title
c) src
d) height
View Answer

Answer: a
Explanation: The alt attributes gives a text description of the image if the image is not available at a time. Syntax is

<img src=”apple.jpg” alt=”This is an apple, It is red” title=”apple”/>

src attribute defines the address of the image, title attribute provides some additional information about the image. Height attribute is used to adjust the height of an image as per need.

advertisement
advertisement

2. Which of the following is not the software for editing images?
a) Adobe Fireworks
b) PaintShop Pro
c) Paint.net
d) Splashup
View Answer

Answer: d
Explanation: Web professionals use various tools for image optimization. Adobe Photoshop, Pixelmator, PaintShop Pro, Paint.net, Adobe Fireworks are some of them. There are online editors also like photoshop.com, splashup.com, pixler.com, ipiccy.com, photoshop.com.

3. JPEG format is useful when ___________
a) there are so many colors in the picture
b) there are not so many colors in the picture
c) we want to show more brightness
d) when we want to show haziness
View Answer

Answer: a
Explanation: When we have different colors in a picture we use JPEG format. But when images have few colors or have large areas of the same color we use PNG or GIF format. Photographs that contain sky, snow, grass etc. are not suitable for PNG or GIF format.
Note: Join free Sanfoundry classes at Telegram or Youtube

4. Up to what resolution image should be saved by using in the web?
a) 23 ppi
b) 34 ppi
c) 72 ppi
d) 100 ppi
View Answer

Answer: c
Explanation: Images that are created for the web should be saved at a resolution of 72 ppi. Here ppi denotes pixels per inch. Resolution’s size is directly proportional to the size of the file. The resolution of the image is measured as a number of squares that fit within 1 inch x 1 inch square area.

5. Images are usually printed at a resolution of ___________
a) 200 dpi
b) 100 dpi
c) 50 dpi
d) 300 dpi
View Answer

Answer: d
Explanation: Images in print materials like in books or in magazines are made up of tiny circles. These tiny circles are called dots. The images are generally printed at a resolution of 300 dpi, dpi stands for dots per inch.
advertisement

6. Vector images are created in ___________
a) Adobe Illustrator
b) Adobe Photoshop
c) Adobe Fireworks
d) Splashup
View Answer

Answer: a
Explanation: Vector images are created commonly in Adobe Illustrator. Vector images are different from bitmap images. Vector images are resolution independent. Images such as logo, diagram, illustration are created in vector format. Bitmap format includes JPG, PNG and GIF images.

7. What is the new format to display vector images?
a) SVG
b) GIF
c) JPG
d) PNG
View Answer

Answer: a
Explanation: SVG stands for Scalable Vector Graphics. It is the new format that is used to display vector images directly, there is no need to create bitmap versions of the images. But it is not yet that much widespread. A GIF is a graphics interchange format. Both JPG and PNG are file format out of which one is lossy compressed while other is lossless compressed one.
advertisement

8. Which format can create a transparent image?
a) PNG
b) GIF
c) JPG
d) SVG
View Answer

Answer: a
Explanation: For creating transparent images one can use PNG or Transparent GIF format. These formats can create see through or partially transparent image. However transparent PNG format is not supported by old browsers like Internet Explorer. SVG stands for Scalable Vector Graphics. It is a new format that is used to display vector images directly. A GIF is a graphics interchange format. JPG is a lossy compressed file format.

9. For caption of the image we use ____________
a) <figure>
b) <src>
c) <alt>
d) <title>
View Answer

Answer: a
Explanation: An alt attributes gives a text description of the image if the image is not available at a time. An address of image is defined by src attribute. HTML5 has introduced new element named <figure>. It contains image and its caption and hence both are associated with each other. We can also have more than one image inside <figure> element and they share the same caption. Syntax is

<figure> <img src=”sea.jpg” alt=”Photograph of the sea”> <br/> 
<figurecaption> Sea is holding hands </figurecaption> </figure>

Name/title of HTML document is given by <title></title> tag.

Sanfoundry Global Education & Learning Series – HTML.

To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.