 
                 
                InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. | The <img> tag is an ………… tag, that means it has no closing tag. | 
| Answer» The <img> tag is an empty tag, that means it has no closing tag. | |
| 2. | <img> tag is used for …………. images. | 
| Answer» <img> tag is used for displaying images. | |
| 3. | …………… tag is used to create inline images. | 
| Answer» <img> tag is used to create inline images. | |
| 4. | The <a> tag is(a) a container tag(b) an empty tag(c) a closing tag(d) None of these | 
| Answer» (a) <a> is a container tag, which requires starting as well as matching ending tag. | |
| 5. | Why is it important to specify width and height attribute in <img> tag?(a) To ensure that image is not copied(b) The image will not render without these(c) To stop the image from loading(d) Helps the browser to load the Web page faster | 
| Answer» (d) Helps the browser to load the Web page faster. | |
| 6. | When creating a Web document, which unit is used to express an image’s height and width?(a) Centimetres(b) Pixels(c) Dots per inch(d) Inches | 
| Answer» (b) Image’s height and width unit are expressed in pixels or in percent form. | |
| 7. | If the image you are loading in the Web page is not available, then you want a text to appear in the image placeholder, text attribute lets you define this text. | 
| Answer» False The alt attribute is used to define text to appear in the image placeholder if image is not visible for any reason. | |
| 8. | The default alignment of images, that are inserted in Web page, is(a) left(b) right(c) inline with text(d) middle | 
| Answer» (c) An image which is inserted in the Web page by default placed inline with text. | |
| 9. | ………… is used to change the color of a visited link. | 
| Answer» vlink is used to change the color of a visited link | |
| 10. | You can have inserted an image in your Web page which is physically present in your computer. | 
| Answer» True With the help of <img src=”image URL”>, we can insert an image in Web page which is present in our computer. | |
| 11. | What is the purpose of using the attribute href in <a> tag? | 
| Answer» The href stands for Hypertext Reference. The href attribute is used with <a> tag to specify the link to some other HTML page or Website. e.g. <a href “”https://www.learncbse.in”> click here </a> to go to learncbse. It will display like: click here to go to learncbse. | |
| 12. | Which tag is used to insert an image in Web page?(a) <a>(b) <table>(c) <img>(d) <p> | 
| Answer» (c) <img> tag is used to insert inline image in a Web page. | |
| 13. | Name the attributes of <a> tag which are used for internal linking in a Web page. | 
| Answer» The attributes of <a> tag which are used for internal linking in a Web page as follows: 1. href used to specify the URL of the segment the link goes to. 2. name gives the name to the segment. | |
| 14. | Using the ………… type URL, you can create the E-mail hyperlink. | 
| Answer» Using the mailto type URL, you can create the E-mail hyperlink. | |
| 15. | For internal linking, the section names are provided by attribute of <a> tag.(a) title(b) href(c) name(d) None of these | 
| Answer» (c) For internal linking, section names are provided by name attribute. | |
| 16. | Explain the need of linking between Web pages. | 
| Answer» Linking between different Web pages is required, as when we create Websites, different HTML files (Web pages) are created. These files contain different modules and cannot be open individually. If we link between them, the Website becomes more productive and informative. | |
| 17. | The tag ……….. is used to create superscripts and …………. tag is used to create subscripts on a Web page. | 
| Answer» The tag <sup> is used to create superscripts and <sub> tag is used to create subscripts on a Web page. | |
| 18. | ………. attribute of the <a> tag is used to name a section in a Web page to create an internal link.(a) href(b) name(c) align(d) link | 
| Answer» (b) name attribute is used to create an internal link. | |
| 19. | ………… tag is used to connect Web pages. | 
| Answer» <a> tag is used to connect Web pages. | |
| 20. | The …………….. attribute of <a> tag is used to provide information or a title for the linked document or Web page. | 
| Answer» The title attribute of <a> tag is used to provide information or a title for the linked document or Web page. | |
| 21. | ……. are used to connect Web pages. They are created with <a> tag. | 
| Answer» Hyperlinks are used to connect Web pages. They are created with <a> tag. | |
| 22. | The …………. tag is considered to establish a hypertext relationship between the current document and another URL. | 
| Answer» The <a> tag is considered to establish a hypertext relationship between the current document and another URL. | |
| 23. | The ………….. attribute is used for specifying the URL of the anchor tag. | 
| Answer» The href attribute is used for specifying the URL of the anchor tag. | |
| 24. | The text specified in the alt attribute is displayed as tooltip in(a) Internet Explorer(b) Google Chrome(c) Both (a) and (b)(d) None of these | 
| Answer» (a) The text specified in alt attribute is displayed as the tooltip in Internet Explorer only. | |
| 25. | Write the full forms of1. <sup>2. <a>3. <img>4. <sub> | 
| Answer» 1. <sup>Superscript 2. <a> Anchor 3. <img> Image 4. <sub> Subscript | |
| 26. | Explain various attributes of <img> tag. | 
| Answer» Attributes of <img> Tag An attribute is an extra piece of information associated with a tag that provides further details about the tag. Following are the various attributes of <img> tag: The src Attribute: The src (source) attribute takes URL (Universal Resource Locator) of an image file as value, which points to the direct location of an image to be displayed. The image that you specify in your <img> tag should be in your computer otherwise the image will not be displayed and in place of image a cross mark in a box 0 will appear. The alt Attribute: This attribute of <img> tag is used to provide alternate text when an image on a Web page cannot be displayed. The alternative text is the text associated with an image that serves the same purpose and conveys the same essential message. As per HTML standard, alt attribute is optional but is highly recommended. The align Attribute: This attribute is used to set the position of an image in a Web page according to the user’s requirements. In HTML, images appear inline with a single line of the text. But, HTML standard does not define a default alignment for the images with respect to other text and images in the same line. There are some values of image alignment attribute as follows: 1. Top Alignment 2. Middle Alignment 3. Bottom Alignment 4. Left Alignment 5. Right Alignment The width and height Attributes: When an image is added to a Web page, it is not mandatory to specify width and height of the image. At the time of loading an image, a box will appear on the place where the image will be loaded. The border Attribute: You can set the border of an image that you want to use in your Web page. The border attribute of the <img> tag specifies the width of the border around an image. By default, an image has no border in HTML. | |
| 27. | Define various alignments of align attribute with example. | 
| Answer» There are some values of image alignment attribute as follows: Middle Alignment This alignment is different in both Internet Explorer and Mozilla Firefox. In Internet Explorer, this alignment aligns the image to the middle of the tallest item in the current line. While in Mozilla Firefox, this alignment aligns the image with the baseline of the current line in which it is placed. Example: To show middle alignment of an image. <html> <head> <title> Alignment </title> </head> <body> <h1> Middle Alignment </ h1> <img src="flower2.jpg" align="middle"> A flower, sometimes known as a b'oom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs. </body> </html> Bottom Alignment This alignment aligns the bottom edge of the image, to the same horizontal plane as the baseline of the text. Both Internet Explorer and Mozilla Firefox treat this alignment in the same manner. Example: To show bottom alignment of an image. <html> <head> <title> Alignment </title> </head> <body> <h1> Bottom Alignment </h1> <img src="flower2.jpg" alt="flower" align="bottom"> Example: To show bottom alignment of an image. <html> <head> <title> Alignment </title> </head> <body> <h1> Bottom Alignment </h1> <img src="flower2.jpg" alt="flower" align="bottom"> A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs. </body> </html> Left Alignment This alignment aligns the image to the left on the Web page respectively of the browser window. Example: To show left alignment of an image. <html> <head> <title> Alignment </title> </head> <body> <h1> Left Alignment </h1> <img src="flower2.jpg" align="left"> A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs. </body> </html> Right Alignment This alignment aligns the image to the right on the Web page respectively of the browser window. Example: To show right alignment of an image. <html> <head> <title> Right Alignment </title> </head> <body> <h1> Right Alignment </h1> Cimg src="flower2.jpg" align="right"> A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants. The biological function of a flower is to effect reproduction, usually by providing a mechanism for the union of sperm with eggs. </body> </html> | |
| 28. | The following code is written to align the image in center in the browser’s window. However, the>desired result is not achieved. Mention the reason. <img src = “image.jpg” align = “center”> | 
| Answer» The reason for not getting the desired result is that center is not a value of align attribute in the <img> tag. | |
| 29. | Write the HTML code to send an E-mail to [email protected] from your Web page. | 
| Answer» <html> <body> <a href="mailto:[email protected]">[email protected]</ > </body> </html> | |
| 30. | Give the expansion of the following1. alt2. <a> | 
| Answer» 1. alt is used for alternate text attribute. 2. <a> is used for anchor tag. | |
| 31. | Write the output on the Web page for the following HTML command.<u>Atomic weight of </u>O<sub>2</sub> | 
| Answer» The output on the Web page will be the Atomic weight of O 2 | |
| 32. | Write a statement in HTML that inserts an image named ‘school.jpg’ found in the ‘images’ folder of the current folder. In case the image cannot be found, it should display ‘Schools in India’. | 
| Answer» <img src =”images\school.jpg” alt=”Schools in India”> | |
| 33. | Write the HTML code to create a link for school .jpg located at C:\. | 
| Answer» <html> <body> <a href = "C:\school. jpg">Image</a> </body> </html> | |
| 34. | Write the HTML code to display an image on the right side of the page. | 
| Answer» <html> <body> <img src="image.jpg" align="right"> </body> </html> | |
| 35. | Write the HTML command to display the following in your Web page. A2+ B2 | 
| Answer» The HTML command is – A<sup>2</sup> + B<sup>2</sup> | |
| 36. | Write the HTML code to send an E-mail to [email protected] from your Web page. | 
| Answer» <html> <body> <a href="mailto:[email protected]">[email protected]</ > </body> </html> | |
| 37. | Write the HTML code to display an inline image named pencil.jpg located at C:\ in the center of your Web page. | 
| Answer» <html> <body> <center> <img src="C:\pencil.jpg"> </center> </body> </html> | |
| 38. | The general syntax for inline image is <img src = “file name” >. | 
| Answer» True At the place of the file name, the path of the image is specified. If the image is in the same folder as HTML file, it is not needed to specify the full path of an image. | |
| 39. | The frame attribute contains types of values.(a) 9(b) 3(c) 6(d) 4 | 
| Answer» (a) The frame attribute contains 9 types of values. | |
| 40. | Distinguish between <sup> and <sub> tags with example. | ||||||||||
| Answer» Distinguishes between <sup> and <sub> tags are as follows: 
 | |||||||||||