0% found this document useful (0 votes)
18 views

Grade 7 Workbook Term 2 Chapter 1 Answer

Uploaded by

abdulgreat243
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Grade 7 Workbook Term 2 Chapter 1 Answer

Uploaded by

abdulgreat243
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Islamiya English School Abu Dhabi

Subject : - ICT Grade 7


Term 2

Worksheet Chapter 6 (answer)

HTML5 Introduction

A. Fill in the blanks with the correct words.

1. The _ <audio> __tag is used to embed an audio file in a web page.

2. The ____color ______ property specifies the foreground colour of the text.

3. The ___ loop ______attribute of the <audio> tag replays the audio file after
reaching its end.

4. The __<video> _____tag is used to insert a video file in an HTML document.

5. The value of the src attribute is ______URL_________________ .

B. Choose the correct option.

1. The attribute of the <img> tag that specifies the URL of an image.

a. src

b. source

c. imagesource

d. None of these

2. ………. is the default value of the font-size property.

a. small

b. medium

c. large

d. None of these
3. Which of the following can be added to an HTML document?

a. Tables

b. Hyperlinks

c. Lists

d. All of these

4. The ____ attribute of the <a> tag specifies the URL of the page where the link
should take you.

a. href

b. src

c. herf

d. None of these

5. Which of the following specifies the colour of a link when it is clicked?

a. active

b. visited

c. hover

d. None of these

6. Which of the following properties can be assigned to the text-align property?

a. left

b. right

c. center

d. Any of these

7. Which of the following can be embedded in a Web page?

a. Audio

b. Video
c. Both a. and b.

d. None of these

8. The ______ tag specifies an image to be displayed in an HTML document.

a. <img>

b. <image>

c. <imagehtml>

d. None of these

C. Write a one-line code to do the following.

1. Give the title of a webpage as "HTML5 - SUMMARY".

______<title>HTML5 – SUMMARY</title> ______________________________

2. Use bgcolor to set the background color of the whole webpage.

_______<body bgcolor=red>______________________________

3. Change the font color of a text to blue and font to "Old Bookman Style".

________<font face=“Old Bookman Style” color=blue>______________


_____________ _____ ____

4. Set the audio file "guitar.mp3" to play automatically on the webpage.

______<audio controls>
<source src=“ guitar.mp3” type=“audio/ogg”>

</audio> _________________________

5. Set the image "school.jpg" on the right side with border 5.

__________<img src=“school.jpg“ border=5 align=right>


__________________
D .What happens when?
1. "Data" keyword in front of the custom attribute is not written.

__To create a custom attribute we use “data-”, followed by desired custom


attribute name and then set to the desired string value.

__

2. HTML file saved with extension .txt is opened in any browser.

__The HTML code written in .txt file will be displayed in the browser. _________

3. <font> tag is not closed after use.

_____font tag will not be executed. _________

4. <source> child element is not included in <picture> tag.

__<source> tag is used as a child element with the <picture> tag to specify
different versions of image source for different viewports. If the screen size
displayed in a browser is not within the given options specified with <source>
tag then the image given with <img> tag as child element of <picture> tag will
be displayed.

__

5. <!DOCTYPE html> is not written as the first line of a HTML5 document.

The first line of the document should be <!doctype html>.This basically tells the
browser about the version of the HTML. If this line is missing browser will not be
able to recognize which type of file to expect.

___

E. True or false?
1. HTML5 is not backwards compatible. ( _False__)
2. Attributes can be created with or without values. ( _False__)
3. We can write HTML code only in Notepad. ( _False__)
4. <audio> tag can work without controls attribute. ( _False__)
5. <img> cannot be used to insert animated images. ( _False__)

F.

Answer the following questions.


1. Give three important points to remember for writing HTML5 code.

a. Tags are not case sensitive. We can write a code in upper, lower or mixed case.
b. Quotes are optional for attributes as well as attribute values.
c. The first line of the document should be <!doctype html>.This basically tells the
browser about the version of the
HTML_______________________________________________________________
_____
2. Give two different ways of inserting an image in HTML5. Give a short code to
support your answer.
2. We can insert images in HTML5 in two ways:

1. By Using <img> Tag: <img> tag is used to insert simple or


animated images in a web page. The image formats supported by
this tag are JPG, GIF and PNG. For example:

<html> <body>

<img src=“flowers.jpg” height=300 width=400 border=3


align=right alt=“Sorry! Image cannot be displayed”>
</body>
</html>

2. By Using <picture> Tag: This tag is new in HTML5 which gives more
flexibility in specifying picture resources. It is used to display the
same or different images for different screen sizes. For example:

<html> <body>

<picture>
<source media=“(min-width:500px) and (max-width:700px)”
src=“flower1. jpg”>
<source media=“(min-width:701px) and (max-width:1000px)”
src=“flower22. jpg”>
<img src=“flower3.jpg” height=200 width=300>

</picture> </body>

</html>
_
3. What are standard attributes? Name any three.
Standard attributes are also called global attributes which are supported by
almost all the elements in html. Some of them are background, accesskey and
align.

____________________________________________________________________
____________________________________________________________________
4. What is backward compatibility? Is HTML5 backward compatible?
Backward compatibility means the compatibility of the new HTML5 with the older
versions of the markup language features to run in older versions of web browsers
along with new features supported by latest web browsers

5. What are structural elements? Name any three.


Structural elements are a group of elements which are used to create the structure
of HTML5 document. Each of these elements are also called section elements.
Some of these are header, nav and article.__________

G. Application-Based Questions.

1. Iram wants to insert an image in a Web page.

a. Which tag will he use to insert an image?


_______<IMG>______________________________________________________

b. Name any two attributes of this tag and their use.


________SRC.______ The src attribute specifies the URL (Uniform Resource
Locator) or file path of the image.
Example: <img src="image.jpg" alt="Description of the image">

_ The height attribute is another common attribute used with the img tag in
HTML_________________________________________________

c. Name the attributes of this tag used to specify the URL of an image. Explain with
an example.
________SRC.______ The src attribute specifies the URL (Uniform Resource
Locator) or file path of the image.
Example: <img src="image.jpg" alt="Description of the image">
___________________________________________________________________
2. Write the HTML code that will change the colour of a hyperlink to maroon when
it is clicked, green when the visitor has visited the link, and orange when the mouse
pointer is over the link.

<head>

<style>
/* Default link styles */
a{
color: blue; /* Default color */
text-decoration: none; /* Remove underline */
}

/* Style for visited links */


a:visited {
color: green; /* Color for visited links */
}

/* Style for hovering over the link */


a:hover {
color: orange; /* Color on hover */
}

/* Style for active (clicked) link */


a:active {
color: maroon; /* Color when clicked */
}
</style>
</head>
<body>

<p>Click on the <a href="#">hyperlink</a> and observe the color changes.</p>


</body>
</html>

3. Diya has created a Web page for her school giving details about various activities
in her school.The school had recently organised a cultural evening for the students.
She wants to add a video of that cultural evening on her Web page. Which HTML
statement should she add to the HTML code for this purpose?

She should make use of the <video> tag to add a video to her HTML document.
Assuming that the name of her video file is ëmovie1.mp4í, the code is listed below.

<video src = "movie1.mp4">

This tag will load the video in the browser but not play it. To make the video play
automatically when the page completes loading, the code is as shown below.

<video src = "movie1.mp4" autoplay = "autoplay">

To show the video player controls, the code is as shown below.

<video src = "movie1.mp4" autoplay= "autoplay" controls ="controls">

You might also like