CLASS 10 LINK AND FRAMES CHAP 4

    SEBA 
    CLASS- 10
    CHAPTER-4
    Link and Frames

    1. Fill in the blanks:

    a. Links tie the web pages together in a website.

    b. When you move the mouse pointer over a link, the mouse pointer changes its shape from an arrow to a small hand

    c. If you want to create an e-mail link, mail to is required before the address.

    d. An anchor or a bookmark in an HTML document is created using the <id> attribute.

    e. The default standard link color is blue.

    f. By default, link open in current window.

    g. The _blank value of the target attribute opens the linked document in a new browser window or a new tab.

    h. To turn an image into a hyperlink, place the image source using the <img> tag between <a> and </a> tags.

    i. The value of the height attribute is assigned in terms of pixels

    j. The loop attribute of the <audio> tag indicates that you can replay the audio file once it is finished.


    Click To Top

    2. Write True or False:

    a. Only a single word can be set as hyperlink. FALSE

    b. The <a> tag is a container element. TRUE

    c. You cannot create a link within the same web page. FALSE

    d. An image can be set as hyperlink. TRUE

    e. The default active link color is red. FALSE

    f. The href attribute specifies where to open the linked document. FALSE

    g. You can also use the align attribute with the image tag. TRUE

    h. Frames allow us to open more than one web page simultaneously in a browser window. TRUE

    i. You cannot change the link color. FALSE

     

    3. Choose the correct options:

    a. A____ is a word, a group of words, or an image that can be used to jump to another document on the same website or another website.

    Hyperlink

    b. Which of the following can be set as hyperlink?

    All of these

    c. The ____ attribute of the <a> tag is used to set URL of the target resource.

    href

    d. The ____ sign lets the browser known that the destination is a named anchor within the current web page.

    None of these

    e. The __ value of the target attribute opens the linked document in the same frame.

    _self

    f. Which of the following are the attributes of the <iframe> tag?

    All of these

    g. Which of the following can be embedded in a web page?

    Both (i) and (ii)

    h. The attribute of the <audio> tag that displays controls on the web page is.

    Controls

    i. Which of the following specifies the color of a link when it is clicked?

    Active

    j. The __ attribute of the <video> tag plays the video file automatically on loading a web page.

    Auto play


    Click To Top

    1. Short answer questions:

    a. How are links indicated on a web page?

    Links are generally indicated on a webpage by an underlined text and appear in a different color, usually blue or purple, depending on whether the link object has been visited or not.

    b. What does the term URL stand for?

    The term URL stands for Uniform Resource Locator.

    c. Name the tag used to create a link. Is it a container element or an empty element?

    The anchor tag <a> is used to create a link.

    It is a container element as it has an ON tag <a> and an OFF tag </a>.

    d. What happen to the shape of the mouse pointer when it moves over a hyperlink?

    When the mouse pointer moves over a hyperlink, the mouse pointer changes its shape from an arrow to a small hand.

    e. What are the default visited and active link colors?

    The default visited link color is purple and the default active link color is red.

    f. Name the attribute of the anchor tag that specifies where to open the linked document.

    The target attribute of the anchor tag specifies where to open the linked document.

    g. Which tag is used to define an inline frame in an HTML5 document?

    The <frame> tag is used to define an inline frame in an HTML5 document.

    h. What is the use of the src attribute of the <iframe> tag?

    The src attribute of the <iframe> tag is use to display the URL of the webpage in the frame.

    i. Name the tag use to embed an audio file on a webpage. Mention any two attributes of this tag.

    The <audio> tag is used to embed an audio file on a webpage.

    Auto play and Controls are the two attributes of this tag.

    j. Name the tag used to insert a video file in an HTML5 document.

    The <video> tag is used to insert a video file in an HTML5 document.


    Click To Top

    2. Long answer questions:

    a. What is the use of hyperlinks? Name the different kinds of hyperlinks.

    A hyperlink is a word, a group of words or an image that is used to jump to another document in the same website or another.

    The different kind of hyperlinks are:

    i) Internal

    ii) Local

    iii) Global

    b. What is the use of the href attributes of the <a> tag? Give an example.

    The href attribute of the <a> tag is used to set the URL of the target resource, which is the address of the document to the link. The href attribute of the anchor tag specify the destination page or file.

    For example: If the word ‘Next Page’ are to be added as a link to an HTML file, the code will be:

    <a href = “filename.html”> Next Page</a>.

    c. What is the purpose of the target attribute of the anchor tag?

    The purpose of the target attribute of the anchor tag is to specify where to open the linked document.

    d. Mention the different values that can be assigned to the target attribute of the <a> tag?

    The different values that can be assigned to the target attribute of the <a> tag are:

    i) _blank

    ii) _parent

    iii) _self

    iv) _top

     

    e. Can you turn an image into a hyperlink? Explain with example.

    Yes, we can turn an image into a hyperlink.

    For example: <a href = “my school.html> <img src = “school.gif”> </a>

    f. What is the use of creating frames in a web page?

    The use of creating frames in a web page is that it allows you to open more than one webpage simultaneously in a browser window. Frames are used to divide your browser window in to multiple section where each section can load a separate HTML document.

    g. What is the use of the height and width attributes of the <iframe> tag?

    The height attribute is used to specifies the height of the inline frame in px. Whereas, Width attribute specifies the width of the inline frame in px.

    h. What is the purpose of the auto play and controls properties of the <audio> tag?

    The purpose of auto play attribute is to specify that the audio should automatically start playing as soon as it is loaded. Whereas,

    The purpose of control properties is to adds audio control like play, pause, and volume.

     

    i. Explain the use of embed tag in an HTML5 document. Mention any three attributes of this tag.

    The embed tag in HTML5 is used for embedding external application which is generally multimedia content like audio, video, pictures etc into an HTML document. It is used as a container for embedding or inserting an external or interactive application in the web such as a plugin. The embed contain four attributes they are:

    i) height: This attribute contains the attribute value in pixel. It is used to specify the height of embedded content.

    ii) src: This attribute holds the URL. It is used to specify web address of the embedded content.

    iii) width: This attribute contains the attribute value in Pixel. It is used to specify web address of the embedded content.

    iv) Type: it contains the media type content. It is used to specify the media type of the embedded content.

    j. Differentiate between < audio> and <video> tags?

    <audio>

    <video>

    i) Used to embed sound content in a document

    i) The video tag is used to embedded video content in a document, such as a movie clips or other video streams.

    ii) It contain one or more <source> tag with different sources.

    ii) It Contain one or more<source> tags with different video sources

    iii) The text between the <audio> and </audio> tag will only be displayed in browser that do not support the <audio> element.

    iii) The text between the <video> and </video> tags will only be displayed in browser that do not support the <video> element

    iv) There are three support audio formats in HTML: MP3, WAV, and OGG

    iv) There are three supported video formats in HTML: MP4, webM and OGG


    Click To Top

    3. Application based questions:

    1. Observed the following HTML5 code and answer the questions that follow:

    <!DOCTYPE html>

    <html>

    <head>

    <title> Inserting Sound File </title>

    </head>

    <body>

    <h2>Having Fun and Listening to Music </h2>

    <audio controls = “controls” src = “mysong.mp3”>

    </body>

    </html>

    a) Which type of the file has been inserted in the HTML5 document? Which tag has been used for this purpose?

    b) What is the use of the src attribute?

    c) What change will you make in the above code, if you want to reply the audio file once it is finished?

    ANS: a) An audio file (mysong.mp3) has been inserted in this HTML5 document. The <audio> tag has been for this purpose.

    b) The use of src attribute is to specify the URL of the audio file.

    c)  The changes that we will make in the above code to replay the audio file once it is finished are coded below:

    <!DOCTYPE html>

    <html>

    <head>

    <title> Inserting Sound File </title>

    </head>

    <body>

    <h2>Having Fun and Listening to Music </h2>

    <audio controls = “controls” src = “mysong.mp3” loop = “loop”>

    </audio>

    </body>

    </html>

    2. Write an HTML5 code to assign green color to a link when it is clicked, orange color if the link has been visited and purple color when the mouse is placed over it.

    ANS:

    <style type = “text/css”>

    a: active { color: green}

    a: visited { color: purple}

    a: hover {color: purple}

    </style>

     

    3. identify the error(s) in the following code and write the correct code.

    <!DOCTYPE html>

    <html>

    <head>

    <title> Creating Frames </title>

    <style type = “text/css”>

    iframe {margin-left: 40; border: 2px dotted orange}

    </style>

    </head>

    <body>

    <h1>Creating Links Frames </h1>

    <iframe href = “firstframe.html” height= “300” width = “200”>

    <iframe href = “secondframe.html” height= “200” width = “200”></iframe> <br>

    We have created two frames.

    </body>

    </html>

    ANS:

    <!DOCTYPE html>

    <html>

    <head>

    <title> Creating Frames </title>

    <style type = “text/css”>

    iframe {margin-left: 40; border: 2px dotted orange}

    </style>

    </head>

    <body>

    <h1>Creating Links Frames </h1>

    <iframe href = “firstframe.html” height= “300” width = “200”></iframe>

    <iframe href = “secondframe.html” height= “200” width = “200”></iframe>

    <br>

    We have created two frames.

    </body>

    </html> 

    4. Ishi’s school recently organized a cultural evening for the students. She has created a web page details about the event. She wants to add audio and video files to the web page. Which tags should she use to add audio and video to the HTML% document? Write the HTML5 code for creating the web page.

    ANS:
    She should use audio and video tag.

    The HTML5 code that she will use for creating this web page.

    <html>

    <head>

    <title> Cultural Evening</title>

    </head>

    <body>

    <h1> St. Joseph’s School Cultural Evening </h1>

    <audio src = “cultural.mp3” autoplay= “autoplay”> </audio>

    <video src = “MOV_006.mp4” height= “800” width =”600”> </video>

    </body>

    </html>

    5. Aman has used the <audio> tag to Insert an audio file in an HTML5 document. He has used the loop attribute in this tag. What is the use of this attribute?

    ANS: The use of the loop attribute is that it indicates if the audio should be replayed once it has finished playing. 


    Click To Top TABLE OF CONTENT