0% found this document useful (0 votes)
269 views42 pages

STD 10 CH 3 Exercise

Uploaded by

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

STD 10 CH 3 Exercise

Uploaded by

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

Question 1

HTML is acronym for :

1. High Text Marker Language


2. Higher Text Markup Language
3. Hyper Text Markup Language
4. Hyper Transfer Makeup Language

Answer

Hyper Text Markup Language

Reason — HTML is acronym for Hyper Text Markup Language.

Question 2

A coded HTML command that indicates how part of a web page is displayed is called ............... .

1. Attribute
2. Tag
3. Style
4. All of these

Answer

Tag

Reason — A coded HTML command that indicates how part of a web page is displayed is called
tag.

Question 3

Which of the following tags identifies the document as an HTML document?

1. <HTML>
2. <HEAD>
3. <BODY>
4. <P>

Answer
<HTML>
Reason — <HTML> tag identifies the document as an HTML document. An HTML document
begins with <HTML> and ends with </HTML>.
Question 4

The tags that require a starting as well as an ending tag are called ............... .

1. Pair Element
2. Twin Element
3. Container Element
4. Empty Element

Answer

Container Element

Reason — The tags that require a starting as well as an ending tag are called Container Element.

Question 5

Which sequence of HTML tags is correct ?

1. <html><head><title></title></head><body></body></html>
2. <html><head><title><body></title></head></body></html>
3. <html><head><title</head><body></body>></title></</html>
4. <htm1><head><title><body></body></title></head></html>

Answer
<html><head><title></title></head><body></body></html>
Reason — The correct document structure of an HTML document
is <html><head><title></title></head><body></body></html>.

Question 6

To specify the background image for the document, Background attribute is used with which of
the following tags ?

1. <BODY>
2. <HTML>
3. <P>
4. None of these

Answer
<BODY>
Reason — "background" is an attribute of the <BODY> tag which is used to specify the
background image for the document. The syntax is as follows:
BODY background = "fileame.gif">
Question 7

To define the basic font size, which of following tag is used ?

1. SIZE
2. BASEFONT
3. FONT
4. All of these

Answer

BASEFONT

Reason — The <BASEFONT> tag lets us define the basic size for the font, which the browser uses
for text with no defined font size.

Question 8

The unnumbered lists can be created by ............... tag.

1. <UL>
2. <OL>
3. <LI>
4. Both (1) and (2)
5. Both (1) and (3)
6. Both (2) and (3)

Answer

Both (1) and (3)

Reason — The unnumbered lists can be created by <UL> and <LI> tags. An unnumbered list
begins with a tag that identifies the type of list (<UL> for unnumbered) and then uses the <LI> tag
to denote the beginning of each new list item. For example:
<UL>
<LI>Apples</LI>
<LI>Bananas</LI>
<LI>Grapes</LI>
</UL>

Question 9

The numbered lists can be created by ............... tag.

1. <UL>
2. <OL>
3. <LI>
4. Both (1) and (2)
5. Both (1) and (3)
6. Both (2) and (3)

Answer

Both (2) and (3)

Reason — The numbered lists can be created by <OL> and <LI> tags. A numbered list begins
with a tag that identifies the type of list (<OL> for numbered) and then uses the <LI> tag to
denote the beginning of each new list item. For example:
<OL>
<LI> First item</LI>
<LI> Second item</LI>
<LI> Third item</LI>
</OL>

Question 10

Consider the following HTML code :

<ol type='i'>
<li>First</li>
<li>Second</li>
<li>Third</li>
<li>Fourth</li>
</ol>
Choose the correct output that would be shown upon execution of the above code , from the
choices given below:

1. I. First
II. Second
III. Third
IV. Fourth
2. i. First
ii. Second
iii. Third
iv. Fourth
3. I First
II Second
III Third
IV Fourth
4. i First
ii Second
iii Third
iv Fourth
Answer

i. First
ii. Second
iii. Third
iv. Fourth
Reason — The "type" attribute with <OL> tag specifies the type of numbering style. With
the <OL> tag, the type attribute may have a value of 'i' for lowercase Roman numerals.

Question 11

We can create a numbered list using the ............... tag.

1. <UL>
2. <list>
3. <OL>
4. <DL>

Answer
<OL>
Reason — We can create a numbered list using the <OL> tag.

Question 12

Identify which of the following type of list will create a bulleted list.

1. Unordered
2. Ordered
3. Definition
4. Numbered

Answer

Unordered

Reason — Unordered list will create a bulleted list.

Question 13

In <OL> and <UL>, the style of bullet or number is defined by ................. .

1. type attribute
2. style attribute
3. both (1) and (2)
4. None of the above

Answer

type attribute

Reason — In <OL> and <UL>, the style of bullet or number is defined by type attribute. For
unordered list, the type attribute may have a value of either disc for a solid circle, circle for a
hollow circle or square for a solid square.
For ordered list, the type attribute may have the value of 'A' for numbering with capital letters, 'a'
for lowercase letters, 'I' for capital and 'i' for lowercase Roman numerals and '1' for common
Arabic numerals.

Question 14

Which of the following will produce a solid circle bullet when given as value of type with <UL> ?

1. disc
2. circle
3. square
4. none of these

Answer

disc

Reason — When the value of type attribute is disc, a solid circle bullet is displayed in an
unordered list.

Question 15

Tag(s) required to create Description lists in HTML :

1. <DL>
2. <DT>
3. <DD>
4. All of the above

Answer

All of the above

Reason — A definition list <DL> usually consists of an alternating definition term <DT> and a
definition description <DD>.
Question 16

An advantage of using basic HTML to create a document is that :

1. all word processors can display the document


2. all browsers can display the document
3. it will print better than a word processing document
4. it is easier to write in HTML

Answer

all browsers can display the document

Reason — An advantage of using basic HTML to create a document is that all browsers can
display the document. HTML is a document layout and hyperlink specification language which
tells the browser to display the contents of a hypertext document in a certain way.

Question 17

Factors that affect how an HTML document looks on the monitor do not include :

1. operating system
2. window size
3. color depth
4. html tags

Answer

operating system

Reason — Factors that affect how an HTML document looks on the monitor do not include
operating system.

Question 18

Every HTML document must include the tags :

1. <html> </html> & <body> </body>


2. <body> </body> & at least one <p>
3. <html> </html> & <head> </head>

Answer

<html> </html> & <body> </body>


Reason — Every HTML document must include <html> </html> & <body>
</body> tags. <html> </html> tags are used to mark the beginning and end of an HTML
document. The <body> </body> tags define a document's body.

Question 19

If the HTML code looks like :

<font face="Arial" size="3"


color ="#000000">Welcome</font>
then the text would look like:

1. Welcome
2. Welcome
3. Welcome
4. Welcome

Answer

Welcome
(Option 3)

Reason — face, size and color attributes of <FONT> tag set the font, size and colour of the text
respectively. Thus, the text (Welcome) will be displayed in "Arial" font of size "3" and its colour
will be "#000000" i.e., black.

Question 20

Which attribute is not valid for <BODY> tag ?

1. background
2. color
3. vlink
4. leftmargin

Answer

color

Reason — color is not an attribute of <BODY> tag. background, vlink and leftmargin are the
attributes of <BODY> tag which specify the background image of the document, the colour of
visited link and the left margin of the document, respectively.

Question 21

Which attribute is NOT valid for the <body> tag ?


1. background
2. color
3. vlink
4. bgcolor

Answer

color

Reason — color is not an attribute of <BODY> tag. background, vlink and bgcolor are the
attributes of <BODY> tag which specify the background image of the document, the colour of
visited link and the background colour of the document, respectively.

Question 22

Which of these is NOT an attribute of the font tag ?

1. color
2. face
3. type
4. size

Answer

type

Reason — type is not an attribute of <FONT> tag. face, size and color attributes of <FONT> tag set
the font, size and colour of the text respectively.

Question 23

How can you make a text appear bold?

1. <b> text </b>


2. <strong> text </strong>
3. both (1) and (2)
4. neither

Answer

both (1) and (2)

Reason — <b> and <strong> tags both can be used to make a text appear bold.

Question 24
Choose the correct HTML tag to make a text italic .

1. <italic>
2. <i>
3. <italicise>
4. all of these

Answer
<i>
Reason — <i> tag is used to make a text italic.

Question 25

If the background image is smaller than the screen, what will happen ?

1. It will be stretched
2. It will leave a blank space at the bottom of your page
3. It will be repeated

Answer

It will be repeated

Reason — If the background image is smaller than the screen, the browser uses a feature called
tiling to repeat the image and fill the browser window.

Question 26

The <title> tag belongs where in your HTML ?

1. Head
2. Arm
3. Body
4. Foot

Answer

Head

Reason — The <title> tag belongs to the <HEAD> tag in HTML.

Question 27

Choose the correct HTML tag for the largest heading.


1. <heading>
2. <h6>
3. <head>
4. <h1>

Answer
<h1>
Reason — HTML has six levels of headings, numbered 1 through 6, with 1 being the largest
i.e., <H1> appears as the largest heading and <H6> appears as the smallest heading.

Question 28

Besides, <B> another way to make text bold is what ?

1. <strong>
2. <dark>
3. <fat>
4. foot

Answer
<strong>
Reason — <strong> tag can be used to make the text appear bold.

Question 29

The attribute used to choose the type of font in HTML is :

1. Character
2. Face
3. Text-type
4. Font-type

Answer

Face

Reason — face attribute of <FONT> tag is used to choose the type of font in HTML.

Question 30

Why should you specify a background color if you are using an image for the actual background
of your page ?

1. The background color will be shown until the image loads


2. In case the image doesn't fit right
3. So the text shows up better

Answer

The background color will be shown until the image loads

Reason — We should specify a background color if we are using an image for the actual
background of our page because the background color will be shown until the image loads.

Question 31

All normal webpages consist of what two parts ?

1. Head and body


2. Top and bottom
3. Body and frameset

Answer

Head and body

Reason — All normal webpages consist of <HEAD> and <BODY> tag.

Question 32

HTML is a :

1. Programming language
2. Web page layout language
3. Markup language
4. Both (2) & (3)

Answer

Both (2) & (3)

Reason — HTML is a Web page layout language and a Markup language.

Question 33

A tag is ............... .

1. HTML command
2. VB command
3. C++ command
4. None of these

Answer

HTML command

Reason — A tag is a coded HTML command that indicates how part of web page should be
displayed.

Question 34

Container elements in HTML require ............... .

1. Starting tag
2. Ending tag
3. Starting and Ending tag
4. None of these

Answer

Starting and Ending tag

Reason — Container elements in HTML require Starting and Ending tags. For example, to make
text bold, we write <B> text </B>. <B> is a container tag.

Question 35

Background attribute of <BODY> is used to :

1. give background color to web page


2. load an image and use it as a background when displaying webpage
3. insert an image within web page.
4. none of these

Answer

load an image and use it as a background when displaying webpage

Reason — Background attribute of <BODY> is used to load an image and use it as a background
when displaying webpage.

Question 36

With which HTML tag do you apply attributes that modify text size, font-face, and color ?

1. <font>
2. <mod>
3. <f>
4. <text>

Answer
<font>
Reason — We apply size, face, and color attributes with <FONT> tag to modify text size, font-
face, and color of the text.

Question 37

Which HTML tag would you apply the bgcolor attribute to in order to change the background
color of the web page ?

1. <html>
2. <head>
3. <body>
4. <p>

Answer
<body>
Reason — We apply the bgcolor attribute with the <BODY> tag in order to change the background
color of the web page.

Question 38

Gagandeep has written the following code to display an image in the background of HTML
document :
<BODY BgGround = "Animals.jpeg">
but he is not getting the desired output. Help him in identifying correct code from the following :

1. <BODY Bg = "Animals.jpeg">
2. <BODY BACK = "Animals.jpeg">
3. <BODY BGIMAGE = "Animals.jpeg">
4. <BODY BACKGROUND = "Animals.jpeg">

Answer
<BODY BACKGROUND = "Animals.jpeg">
Reason — "bgGround" is not an attribute of <BODY> tag. Background attribute of <BODY> is used
to display an image in the background of HTML document.

Question 39

In which section of an HTML document do you enter the <P> element ?


1. The body section.
2. The footer section.
3. The style sheet.
4. The head section.

Answer

The body section.

Reason — We use the <P> element in the body section of an HTML document.

Question 40

In which HTML element do you apply attributes that modify the background image ?

1. The <html> element.


2. The <head> element.
3. The <background> element.
4. The <body> element.

Answer

The <body> element.


Reason — Background attribute of <BODY> tag is used to modify the background image of
HTML document.

Question 41

Which of the following heading tags will cause a browser to render text at the largest default size
?

1. <h3>
2. <h2>
3. <h5>
4. <h4>

Answer
<h2>
Reason — HTML has six levels of headings, numbered 1 through 6, with 1 being the largest
i.e., <H1> appears as the largest heading and <H6> appears as the smallest heading. Thus, in the
given options, <h2> will cause a browser to render text at the largest default size.

Question 42

Which is the correct way to comment out something in HTML ?


1. Using ## and #
2. Using <!-- and -->
3. Using </-- and -/->
4. Using <!-- and -!>

Answer

Using <!-- and -->


Reason — <!-- and --> is the correct way to comment out something in HTML.

Question 43

Which of the following is the proper syntax to start an HTML comment ?

1. <!--
2. <!>
3. <comment>
4. <notate>

Answer
<!--
Reason — <!-- is the proper syntax to start an HTML comment.

Question 44

Which one of the following is the HTML tag used to insert a horizontal rule ?

1. <h1>
2. <hr>
3. <rule>
4. <br>

Answer
<hr>
Reason — <hr> tag is used to insert a horizontal rule in an HTML document.

Question 45

HTML tag to draw horizontal line :

1. <h1>
2. <hr>
3. <hline>
4. None of the above
Answer
<hr>
Reason — <hr> tag is used to draw horizontal line in an HTML document.

Question 46

What HTML container tags do you apply to text to format the text as a paragraph ?

1. <para></para>
2. <text></text>
3. <p></p>
4. <format style="para"></format>

Answer
<p></p>
Reason — <p></p> tags are used to format the text as a paragraph.

Question 47

Which HTML tags cause browsers to render text as italics ?

1. <text style = "italics"></text>


2. <ital></ital>
3. <i></i>
4. <b></b>

Answer
<i></i>
Reason — <i></i> tags are used to display the text as italics in an HTML document.

Question 48

Interpret this statement :


<strong>Michelle</strong>

1. It makes Michelle strong


2. It highlights Michelle as being strong
3. It will print out Michelle in bold font
4. It will print strong Michelle/strong

Answer

It will print out Michelle in bold font


Reason — <STRONG> tag is used to make text appear bold. Thus, it will print out Michelle in
bold font.

Question 49

Which one is correct ?

1. <b>Click Here<b>
2. <strong>Click Here<strong>
3. <b>Click Here</b>
4. </strong>Click Here</strong>

Answer
<b>Click Here</b>
Reason — HTML tags are written in angle brackets ( <> ). Container tags require pair tags. The
ending tag is similar to that of the starting tag except that it begins with a slash ( / ) symbol.

In option 1 and 2, the ending tag doesn't have a slash symbol. In option 4, the starting tag has a
slash symbol which is incorrect. Thus, option 3, <b>Click Here</b> is correct.

Question 50

The page title is inside the ............... tag.

1. Body
2. Head
3. Division
4. Table

Answer

Head

Reason — The page title is inside the <HEAD> tag.

Question 51

To align multiple lines of text we use ............... .

1. Justify
2. DIV
3. Align
4. None of these.

Answer
DIV

Reason — To align multiple lines of text we use <DIV> tag.

Question 52

The value of #FFFFFF is :

1. Black
2. White
3. Red
4. none of the above.

Answer

White

Reason — The value of #FFFFFF is white.

Question 53

The value of #000000 is :

1. Black
2. White
3. Red
4. none of the above.

Answer

Black

Reason — The value of #000000 is black.

Question 54

In HTML, lists can be of :

1. unnumbered
2. numbered
3. definition
4. all of these

Answer
all of these

Reason — In HTML, lists can be of three types — unnumbered, numbered and definition.

Question 55

To start a list at the count of 3, use which ?

1. <ol start="3">
2. <ol begin="3">
3. <ol list="5">

Answer
<ol start="3">
Reason — The start attribute of <OL> tag sets the starting value of an item integer counter at the
beginning of an ordered list.

Question 56

Which of the following is the correct way to create a list using the lowercase letters ?

1. <ol alpha = a">


2. <ol type = "a">
3. <ol letter = "a">
4. None of the above

Answer
<ol type = "a">
Reason — The type attribute of <OL> tag sets the actual numbering style of an ordered list.

Question 57

What is the correct HTML for adding a background color ?

1. <body background="yellow">
2. <background>yellow</background>
3. <body style="background-coloris:white">
4. <body bgcolor="white">

Answer
<body bgcolor="white">
Reason — bgcolor attribute of <BODY> tag sets the background colour of the HTML document.
Question 58

To create a bulleted list use ?

1. <il>
2. <ul>
3. <ol>

Answer
<ul>
Reason — We use <UL> to create a bulleted list.

Question 59

When making bulleted lists you have what options ?

1. disc, circle, square


2. triangle, square, circle
3. square, disc, polygon

Answer

disc, circle, square

Reason — For unordered list, the type attribute may have a value of either disc for a solid circle,
circle for a hollow circle or square for a solid square.

Question 60

Which one of the following is the list type that will create a bulleted list ?

1. unordered
2. option
3. decorated
4. ordered

Answer

unordered

Reason — An unordered list will create a bulleted list.

Question 61

HTML is a :
1. Package
2. Software
3. Language
4. None of these

Answer

Language

Reason — HTML is a Web page layout language and a Markup language.

Question 62

Choose the correct HTML tag to make the text bold ?

1. <B>
2. <BOLD>
3. <STRONG>
4. Both (1) & (3)

Answer

Both (1) & (3)

Reason — <b> and <strong> tags both can be used to make a text appear bold.

Question 63

Choose the correct HTML tag for the largest heading ?

1. <H1>
2. <H6>
3. <H10>
4. <HEAD>

Answer
<H1>
Reason — HTML has six levels of headings, numbered 1 through 6, with 1 being the largest
i.e., <H1> appears as the largest heading and <H6> appears as the smallest heading.

Question 64

Which of the following will result in the largest text size ?

1. <H3>
2. <H6>
3. <H2>
4. <H4>

Answer
<H2>
Reason — HTML has six levels of headings, numbered 1 through 6, with 1 being the largest
i.e., <H1> appears as the largest heading and <H6> appears as the smallest heading. Thus, in the
given options, <h2> will result in the largest text size.

Question 65(a)

State True or False :


<BR> tag has its closed tag as </BR>
Answer

False

Reason — <BR> is an empty element. It does not have a closing tag </BR>.

Question 65(b)

State True or False :


<P> tag has no closing tag
Answer

False

Reason — <P> is a container element. Thus, it requires a starting tag <P> and a closing tag </P>.

Question 65(c)

State True or False :


<HR> tag is same as <BR>
Answer

False

Reason — The <HR> tag produces a horizontal line spread across the width of the browser
window while the <BR> tag is used to end one line and jump to the next line.

Question 65(d)

State True or False :


<KBD> tag is used to display tables
Answer
False

Reason — <KBD> tag is used to display text as user keyboard entry. It is typically displayed in a
fixed width font.

Question 66

In <BR> tag resets the paragraph alignment to the default left alignment. True or False ?
Answer

False

Reason — The <HR> tag resets the paragraph alignment to the default left alignment while after
the <BR> tag, the previously set alignment of the paragraph is retained.

Question 67

The textual content that appears in the source HTML document but is not rendered by the
browser is called ............... .

Answer

The textual content that appears in the source HTML document but is not rendered by the
browser is called comment.

Question 68

Comments are enclosed in ............... and ............... tags.

Answer

Comments are enclosed in <!-- and --> tags.

Question 69

By default <HR> produces a ............... rule.


Answer

By default <HR> produces a 3-D rule.

Question 70

............... text styles are handled in its own way by the browsers.

Answer

Logical text styles are handled in its own way by the browsers.
Question 71

To display an & on the web page, ............... is used in the source HTML code.

Answer

To display an & on the web page, &amp; is used in the source HTML code.

Question 72

Two tags break the line flow. These are : ............... and ............... .

Answer

Two tags break the line flow. These are : <BR> and <HR>.

Question 73

Background colour is set by ............... attribute and background graphics is set by ...............
attribute of ............... tag.

Answer

Background colour is set by Bgcolor attribute and background graphics is set


by Background attribute of Body tag.

Question 74

An element that only has a starting tag and no ending tag is ............... element.

Answer

An element that only has a starting tag and no ending tag is empty element.

Theoretical Questions

Question 1

HTML stands for ............... .

Answer

HTML stands for HyperText Markup Language.

Question 2
What do you understand by 'Tag' ?

Answer

A tag is a coded HTML command that indicates how a part of web page should be displayed.
HTML tags are written inside angle brackets (< >). For example,
<H1>Main Heading</H1>

Question 3

What is an attribute in HTML ?

Answer

An attribute is a special word used inside tag to specify additional information to tag such as
color, alignment, etc. For example, 'bgcolor' attribute of <BODY> tag is used to set the background
colour of an HTML document.
<BODY bgcolor = "white">

Question 4

Define the tag, <HTML>.

Answer

The <HTML> tag it the root element of the html document. It identifies the document as an
HTML document. An HTML document begins with <HTML> and ends with </HTML>.

<HTML>
....HTML document lines here
</HTML>

Question 5

HR tag is used for ............... .

Answer

HR tag is used for horizontal rule.

Question 6

<TITLE> tag is used to define ............... .

Answer

<TITLE> tag is used to define title of the document.


Question 7

What is the basic structure of HTML File ?

Answer

Every HTML document should follow the general form given below:

<HTML>
<HEAD>
<TITLE> Title of page is written here </TITLE>
</HEAD>
<BODY>
The HTML tags that define the page are written here
</BODY>
</HTML>
The <HEAD>...</HEAD> tags make the header of the document and the <BODY>...</BODY> tags
make the body of the HTML document.

Question 8

Face attribute is used with ............... tag and used for ............... .

Answer

Face attribute is used with <FONT> tag and used for setting the font type of the text.

Question 9

To align multiple lines of text we use ............... .

1. Justify
2. DIV
3. Align
4. None of these

Answer

Align

Reason — Align attribute of <P> tag is used to change the alignment of a paragraph. It is not
supported in HTML5.

Question 10

What is the use of 'size' in <BASEFONT> tag ?


Answer

The <BASEFONT> tag is used with its attribute "size", whose value determines the document's
base font size. The size can have an absolute value from 1 to 7 (eg., size = 5) or a relative value
by placing a plus or minus sign before the value (eg., size = +1).

Question 11

List the attributes of <FONT> tag.


Answer

The attributes of <FONT> tag are:

1. size — sets the size of the font of text


2. face — sets the font type of the text
3. color — sets the colour of the font of text

Question 12

List and define different types of paragraph alignments.

Answer

The different types of paragraph alignments are as follows:

1. Left alignment — When the value of align attribute of <P> tag is 'left', the paragraph is
aligned to the left margin of the page.
2. Center alignment — When the value of align attribute of <P> tag is 'center', the
paragraph is aligned to the center of the page.
3. Right alignment — When the value of align attribute of <P> tag is 'right', the paragraph
is aligned to the right margin of the page.

Question 13

The value of #FFFFFF is ............... .

1. Black
2. White
3. Red
4. none of the above

Answer

The value of #FFFFFF is white.

Question 14
The value of #000000 is ............... .

1. Black
2. White
3. Red
4. none of the above

Answer

The value of #000000 is black.

Question 15(a)

<BR> tag has its closed tag as </BR>. State True or False?
Answer

False

Reason — <BR> is an empty element. It does not have a closing tag </BR>.

Question 15(b)

<P> tag has no closing tag. State True or False?


Answer

False

Reason — <P> is a container element. Thus, it requires a starting tag <P> and a closing tag </P>.

Question 15(c)

<HR> tag is same as <BR>. State True or False?


Answer

False

Reason — The <HR> tag produces a horizontal line spread across the width of the browser
window while the <BR> tag is used to end one line and jump to the next line.

Question 15(d)

<KBD>tag is used to display tables. State True or False?


Answer

False
Reason — <KBD> tag is used to display text as user keyboard entry. It is typically displayed in a
fixed width font.

Question 16

The default alignment of text is ................. , default text color is ................. and the default
background color is ................. .

Answer

The default alignment of text is left, default text color is black and the default background color
is white.

Question 17

Give the coding for giving the heading 'PACE Computer Education' of <H1> tag, font style as
Comic Sans MS, text color as blue. Body text color as red, background as green, alignment as
center, font style of body text as Brush script, size = 15. The text for body is as follows :
Education is the
ability to listen to almost
anything without
losing your temper
or your
self confidence.
And so is Democracy and Maturity too.

Answer

<BODY BGCOLOR = "GREEN" TEXT = "RED">


<H1>
<FONT FACE = "COMIC SANS MS" COLOR = "BLUE">PACE Computer
Education</FONT>
</H1>

<P ALIGN = "CENTER">


<FONT FACE = "BRUSH SCRIPT" SIZE = "15">
Education is the
ability to listen to almost
anything without
losing your temper
or your
self confidence.
And so is Democracy and Maturity too.
</FONT>
</P>
Question 18(i)

What is wrong in the following coding ?

<HEAD> <my web page >


<TITLE> Welcome to My Web Page
</HEAD>
</TITLE>
Answer

The <TITLE> tag must be entered between the opening and closing <HEAD> tags. Since "my web
page" is not a tag, it should not be enclosed between angle brackets and should be written inside
the <BODY> tag.
The correct code is as follows:

<HEAD>
<TITLE> Welcome to My Web Page </TITLE>
<BODY>
my web page
</BODY>
</HEAD>

Question 18(ii)

What is wrong in the following coding ?

<FONT name = "Arial",


type = "Bold" size = 3>
Answer

The <FONT> tag has three attributes :

1. face — It defines the font type


2. color — It sets the color of font
3. size — It sets the size of font

Type attribute is not used with <FONT> tag. To make the text bold, we use
the <B> or <STRONG> tag.
The correct code is as follows:

<FONT face = "Arial" size = "3">

Question 18(iii)

What is wrong in the following coding ?

<FONT face = comic sans ms color = Red>


Answer

String values of attributes must be enclosed within quotes.

The correct code is as follows:

<FONT face = "comic sans ms" color = "Red">

Question 18(iv)

What is wrong in the following coding ?

<FONT color = #345678


Answer

All HTML tags are enclosed in angle brackets (< >). The values of attributes are given in double
quotes (" ").

The correct code is as follows:

<FONT color = "#345678">

Question 18(v)

What is wrong in the following coding ?

<BODY color = "Red" background = "Myimage.jpg">


Answer

The attribute used to set the colour of text in a document is text.

The correct code is as follows:

<BODY text = "Red" background = "Myimage.jpg">

Question 18(vi)

What is wrong in the following coding ?

<BR> </BR>
Answer

<BR> is an empty tag. It doesn't have a closing tag.

Question 18(vii)

What is wrong in the following coding ?


<P Font face = "Arial" color = "Blue">
Answer

The paragraph <P> tag and the font <FONT> tag should be written in separate angle brackets as
both are different tags.
The correct code is as follows:

<P> <FONT face = "Arial" color = "Blue">

Question 18(viii)

What is wrong in the following coding ?

<Body Margin Top = 60 Left = 75>


Text with changed margin </Body>
Answer

The attributes 'leftmargin' and 'topmargin' of <BODY> tag are used to specify the left and top
margin of the document, respectively. The values of attributes should be enclosed in double
quotes (" ").
The correct code is as follows:

<Body Topmargin = "60" Leftmargin = "75">


Text with changed margin </Body>

Question 18(ix)

What is wrong in the following coding ?

<BASEFONT SIZE = 5>


<BODY> Text with New format
</BODY>
Answer

<BASEFONT> tag should be inside the <BODY> tag.


The correct code is as follows:

<BODY>
<BASEFONT SIZE = 5>
Text with New format
</BODY>

Question 18(x)

What is wrong in the following coding ?

<HTML>
<HEAD>
<TITLE> New Page
</HEAD>
</TITLE>
</HTML>
Answer

The <TITLE> tag must be entered between the opening and closing <HEAD> tags.
The correct code is as follows:

<HTML>
<HEAD>
<TITLE> New Page
</TITLE>
</HEAD>
</HTML>

Question 19

Differentiate between <TITLE> and <HEAD> tags.


Answer

<TITLE> tag <HEAD> tag

<TITLE> tag contains the The <HEAD> tag is used to define the document header. It
document title and identifies its contains information about the document, including its title,
content in a global context. scripts used, style definitions and document descriptions.
<TITLE> tag is enclosed
<HEAD> tag contains <TITLE> tag inside it.
in <HEAD> tag.

Question 20

Differentiate between container and empty elements.

Container elements Empty elements

Empty elements require only an opening


Container elements require both, an opening and a closing tag.
tag and not a closing tag.

Container elements affect the text appearing between their Empty elements just carry out the job
opening and a closing tag. assigned to them.
Container elements Empty elements

For example, <TITLE>...</TITLE>, <FONT>...</FONT> etc. For example, <BR>, <HR> etc.
Answer

Question 21

Differentiate between <BR> and <P> tag.


Answer

<BR> tag <P> tag

<BR> tag is a line break tag that is used to end one <P> tag is a paragraph tag that
line and jump to the next line without showing is used to define a paragraph of
any line in between. text.
It is an empty element. It is a container element.

Question 22

List and define different types of heading tags.

Answer

HTML has six levels of headings, numbered 1 through 6, with 1 being the largest. Headings are
typically displayed in larger and bolder fonts than normal body text.

The heading tags are as follows:

1. <H1>
2. <H2>
3. <H3>
4. <H4>
5. <H5>
6. <H6>

The first heading in a document is tagged <H1>, the second heading is tagged as <H2> and so on.

Question 23

List and explain the different attributes of body tag.

Answer

The different attributes of body tag are as follows:


1. alink — It specifies the colour of an active link in a document.
2. background — It specifies a background image for the document.
3. bgcolor — It specifies the background colour of a document.
4. link — It specifies the colour of unvisited links in a document.
5. text — It specifies the colour of the text in a document.
6. vlink — It specifies the colour of visited links in a document.
7. leftmargin — It specifies the left margin in a document.
8. topmargin — It specifies the top margin in a document.

The attributes are used with <BODY> tag in the following way:
<BODY ALINK = "BLUE" VLINK = "YELLOW" BACKGROUND = "ANIMALS.JPG"
BGCOLOR = "BLACK" TEXT = "WHITE" LEFTMARGIN = "60" TOPMARGIN =
"80">

Question 24

What is the difference between basefont and font tag ?

Answer

basefont tag font tag

The <FONT> tag applies font and text styling to a


The <BASEFONT> tag sets a base font
specific section of text enclosed within its opening
size for the entire document.
and closing tags.
The closing tag </BASEFONT> is The closing tag </FONT> is must for the changes in
optional. appearance to take effect.

Question 25

How can a 2D or 3D horizontal rule be displayed ?

Answer

The <HR> tag is used to produce horizontal line spread across the width of the browser window.
By default, a 3D horizontal line is produced.
If we want to produce a 2D rule, we add "noshade" to <HR> tag.
For example:

<HR> <!-- This tag produces a 3D horizontal rule -->

<HR noshade> <!-- This tag produces a 2D horizontal rule -->


Question 26

What are logical and physical text styles ?

Answer

Logical text styles are general descriptions. Each browser handles a logical style in its own way.
Logical styles render the text according to its meaning. For example, <EM> is for emphasizing
something and <STRONG> is for strongly emphasizing something.
<STRONG> This is an example of logical text style </STRONG>
Physical text styles indicate the specific type of appearance for a section. For example, bold,
italics, underlined etc. They are rendered in the same manner by all browsers.

<B><I> This is an example of physical text style </I></B>

Question 27

How can different tags be combined in HTML ? What is its use ?

Answer

HTML allows us to combine various tags together so as to achieve the desired result and effect.
Different tags are enclosed in one another to combine their effects.

For example, if we want our text to appear bold and underlined, we can use <B> and <U> tags
together in the following manner:
<B><U> Bold and Underlined </U></B>

Question 28

What all tags are required in every HTML page ?

Answer

The following tags are required in every HTML page:

1. <HTML>...</HTML>
2. <HEAD>...</HEAD>
3. <BODY>...</BODY>

Question 29

Write the HTML code for the following to appear one after the other :

 A small heading with the words, "We are Proud to Present"


 A horizontal rule across the page
 A large heading with the one word, "Orbit"
 A medium-sized heading with the words, "The Geometric Juggler"
 Another horizontal rule

Answer

<H3>We are Proud to Present</H3>


<HR>
<H1>Orbit</H1>
<H2>The Geometric Juggler</H2>
<HR>

Output

Question 30

Insert the appropriate line break and paragraph break tags to format the following poems with a
blank line between them :

A Morning is a Wonderful Blessing,


Either Cloudy or Sunny
It stands for Hope, giving us another
Start of what we call Life.
Answer

<P>
A Morning is a Wonderful Blessing, <BR>
Either Cloudy or Sunny <BR>
It stands for Hope, giving us another <BR>
Start of what we call Life. <BR>
</P>

Output

Question 31

Write a complete HTML Web page with the title "Foo Bar" and a heading at the top which reads
"Happy Hour at the Foo Bar", followed by the words "Come on down!" in regular type.

Answer
<HTML>
<HEAD>
<TITLE> Foo Bar </TITLE>
</HEAD>

<BODY>
<H1> Happy Hour at the Foo Bar </H1>
<P>Come on down!</P>
</BODY>
</HTML>

Output

Question 32

How would you say,


"We're having our annual Impeachment Day SALE today,"
in normal sized blue text, but with the word "SALE" in the largest possible size in bright red ?

Answer

<FONT COLOR = "BLUE">We're having our annual Impeachment


Day</FONT>
<FONT COLOR = "RED" SIZE = 7> SALE </FONT>
<FONT COLOR = "BLUE">today</FONT>

Output

Question 33

What type of lists are supported by HTML ?

Answer

HTML supports the following types of lists:

1. Unnumbered or bulleted list — These lists are indented lists with a special bullet symbol in
front of each item. For example,

<UL>
<LI>Apples</LI>
<LI>Bananas</LI>
<LI>Grapes</LI>
</UL>
2. Numbered or ordered list — These are indented lists that have numbers or letters in front of
each item. For example,

<OL>
<LI>Apples</LI>
<LI>Bananas</LI>
<LI>Grapes</LI>
</OL>
3. Definition lists — A definition list <DL> usually consists of an alternating definition
term <DT> and a definition description <DD>. For example,
<DL>
<DT>Apples</DT>
<DD>Apples are rich in Vitamin A. They are good for eye
sight. They should be eaten in the morning.</DD>
<DT>Bananas</DT>
<DD>Bananas are rich in calcium. They keep the stomach
healthy. They should be eaten during the day.</DD>
</DL>

Question 34

Differentiate between ordered and unordered lists.

Answer

Ordered list Unordered list

Ordered list are indented lists that have numbers or Unordered list are indented lists with a special bullet
letters in front of each item. symbol in front of each item.

For example, For example,


<OL> <UL>
<LI>Apples</LI> <LI>Apples</LI>
<LI>Bananas</LI> <LI>Bananas</LI>
<LI>Grapes</LI> <LI>Grapes</LI>
</OL> </UL>

Question 35
How will you nest an unordered list inside an ordered list ?

Answer

We can nest an unordered list inside an ordered list in the following manner:

<OL>
<LI>Fruits
<UL>
<LI>Apples</LI>
<LI>Grapes</LI>
<LI>Bananas</LI>
</UL>
</LI>
<LI>Vegetables
<UL>
<LI>Potatoes</LI>
<LI>Cabbages</LI>
<LI>Gourd</LI>
</UL>
</LI>
<LI> Dairy Products
<UL>
<LI>Milk</LI>
<LI>Curd</LI>
<LI>Buttermilk</LI>
</UL>
</LI>
</OL>

Question 36

Which three tags let you create the definition lists ?

Answer

The three tags that let us create the definition lists are :

1. <DL> — It is used to define the starting and ending of a definition list.


2. <DT> — It specifies a definition term.
3. <DD> — It specifies a definition description. Web browsers usually format the definition
on a new line and indent it.

A definition list is written in the following manner:

<DL>
<DT>Apples</DT>
<DD>Apples are rich in Vitamin A. They are good for eye
sight. They should be eaten in the morning.</DD>
<DT>Bananas</DT>
<DD>Bananas are rich in calcium. They keep the stomach
healthy. They should be eaten during the day.</DD>
</DL>

Question 37

Which two tags let you create the

(i) unnumbered lists ?

(ii) numbered lists ?

Answer

(i) The <UL> and <LI> tags let us create unnumbered lists.
(ii) The <OL> and <LI> tags let us create numbered lists.

You might also like