Grade 7 Workbook Term 2 Chapter 1 Answer
Grade 7 Workbook Term 2 Chapter 1 Answer
HTML5 Introduction
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.
1. The attribute of the <img> tag that specifies the URL of an image.
a. src
b. source
c. imagesource
d. None of these
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
a. active
b. visited
c. hover
d. None of these
a. left
b. right
c. center
d. Any of these
a. Audio
b. Video
c. Both a. and b.
d. None of these
a. <img>
b. <image>
c. <imagehtml>
d. None of these
_______<body bgcolor=red>______________________________
3. Change the font color of a text to blue and font to "Old Bookman Style".
______<audio controls>
<source src=“ guitar.mp3” type=“audio/ogg”>
</audio> _________________________
__
__The HTML code written in .txt file will be displayed in the browser. _________
__<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.
__
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.
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:
<html> <body>
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
G. Application-Based Questions.
_ 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 */
}
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.
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.