CAIE 2023 - 24 GRADE 8 SUBJECT – ICT Chapter 9: Images, Links and Frames in HTML 5 Book back exercise A. Fill in the blanks. 1. Images can be added to the document with the help of <img> tag. 2. The alt attribute lets you specify text as an attribute to the image. 3. Hyperlinking is linking two web pages together. 4. When one part of a web page is linked to another section of the same page, it is called internal linking. 5. Frames allow multiple HTML documents to be presented as independent windows within one browser window. 6. Groove is one of the possible values for the CSS property border-style. B. State True or False. Statement True False 1. You cannot display photographs on a web page. 2. <H> is used to mark the text as a hypertext link. 3. The value for alt attribute is a text string of 2000 characters. 4. Any image can be used as a hyperlink to another document. 5. You can insert an audio clip or file of any format like .mp3, .ogg, .wav, etc. in our webpage with the help of audio tag. 6. In HTML5, frames can be created using <iframe> C. Application-based questions. 1. Asmita has added a few images to her web page but she wants to keep some provision for visually impaired people or users o f text-based browsers so that they get the description for the images. Which attribute should she use to accomplish the task? Ans. Asmita should make use of the ALT attribute of the <img> tag which is used to specify text as an alternate to any image. This attribute can help display the text to provide a description about the image. 2. Vikram is creating a website in which he wants to use different images as links to the web pages. He is also interested in adding some video clips to his website. Canyou suggest to him the required tags to include the above-mentioned elements in his website? Ans. To use different images as links on a webpage, Vikram needs to use the following tags: <a href= “ ”> <img src = “ ”> </a> To add video clips on his website, he needs to use the <video> tag as follows: <video controls src= “ ”> He can make use of the attributes associated with the <video> tag : height, width, autoplay. A. Multiple-choice questions. 1. href attribute of <A> tag defines the document to which the link leads. 2. A Relative URL points to a file within a website. 3. Which of the following specifies the color of a link when it is clicked? c. Active 4. Autoplay attribute of <audio> tag plays the audio file automatically when the web page is loaded. 5. webm is one of the supported file formats for video file. 6. Frames allow multiple HTML documents to be presented as independent windows within one browser window. B. Answer the following questions. 1. How are images added in an HTML document? What are the different attributes of an image element? Ans. Images are added in HTML using the <img> tag for inline images. For inserting external images, the anchor <a> tag is used that establishes a link to the image. Different attributes that are specified with the <img> tag are: i. src: To add and define the source of an image on a webpage. Syntax: <img src= “Name or path of the image file”> ii. The HEIGHT attribute specifies height(in pixels) for an image either in the form of an integer or a percentage value. iii. The WIDTH attribute specifies width(in pixels) for an image either in the form of an integer or a percentage value. Syntax: <img src= “camel.jpg” style= height: 70%; width: 50%> iv. To align an image to the left or right of a text, the CSS property-float is used. Syntax: <img src= “image.jpg” style= float:right > v. The ALT attribute lets you specify the text as an alternate to the image. Syntax: <img src= “Avengers.jpg” alt= “Image of superheroes” > 2. What is the importance of associating alternate text with an image? Ans. Sometimes a browser on the user’s computer does not display images due to some reasons (maybe due to slow connection or erroring the src attribute). In that case, you can display the text to provide a description about the image. Putting alternating text proves to be useful when the user is a blind surfer for whom the browser is programmed to read aloud the alternate text instead of displaying the image. Also, in many cases, people have image display disabled on their browsers or use settings that do not support the automatic loading of images. 3. How can you link webpages in HTML? What are the different types of linking? Ans. We can link webpages in HTML using the anchor <A> tag to mark the text as a hyperlink which a user can click to display the webpage anchored to it. It uses HREF attribute to define the document to which the link leads. Syntax: <a href = “value”> Click Here </a> Where value = i. Absolute URL ii. A relative URL iii. Link to an email address The different types of linking are internal linking and external linking. 4. With the help of code, explain how audio and video clips can be added in an HTML document. Ans. We can add audio files using <audio> tag: <audio controls src= “maroon.mp3”> </audio> We can add video files using <video> tag: <video controls src= “willow.mp4”> </video> 5. Explain how frames are useful. Ans. Frames help us organize our website. They enable the user to divide a page into a number of rectangular segments for different purposes. Frames allow multiple HTML documents to be presented as independent windows within one browser window. This gives greater flexibility to design and maintain your site than simply dumping everything on one page. Frames make you site interesting as you can include the site theme (image, logo, banners, etc.). C. Answer in one word. 1. The tag that inserts an inline image on a web page. <img> 2. The attribute of <img> tag that specifies the text as an alternate to the image. alt 3. The tag that marks the text as a hyperlink. <a> 4. The attribute of <a> tag that defines the document to which the link leads. href 5. The attribute of <video> tag that plays the video file automatically. autoplay 6. The CSS property that renders the inline frame borders. Border