KnowledgeBoat Logo
OPEN IN APP

Chapter 3

Basic HTML Elements

Class 10 - Kips Cyber Beans CBSE Computer Code 165



Multiple Choice Questions

Question 1

The ............... contain elements which define how the information on a web page is formatted or displayed.

  1. Editors
  2. Tags
  3. Attributes
  4. None of these

Answer

Tags

Reason — The tags contain elements which define how the information on a web page is formatted or displayed.

Question 2

The ............... tag contains the content of your document which gets displayed on the web page of your browser window.

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

Answer

<BODY>

Reason — The <BODY> tag contains the content of our document which gets displayed on the web page of our browser window.

Question 3

Which special property provides additional information about an HTML element?

  1. Tag
  2. Element
  3. Attribute
  4. None of these

Answer

Attribute

Reason — The attribute property provides additional information about an HTML element.

Question 4

The ALIGN attribute of <P> tag cannot take ............... value.

  1. Right
  2. Left
  3. Justify
  4. None of these

Answer

None of these

Reason — The ALIGN attribute of <P> tag can take right, left and justify as value.

Question 5

Which of the following tags helps in retaining the spacing of text or displaying the preformatted spaces on a webpage in an HTML document?

  1. <SPACE>
  2. <PRE>
  3. <SPC>
  4. None of these

Answer

<PRE>

Reason — The <PRE> tag helps in retaining the spacing of text or displaying the preformatted spaces on a webpage in an HTML document.

Question 6

Which tag adds a line horizontally on your web page?

  1. <HR>
  2. <LINE>
  3. <LINE Direction="horizontal">
  4. <TR>

Answer

<HR>

Reason — The <HR> tag adds a line horizontally on your web page.

Question 7

Choose the correct HTML tag to make the text italic.

  1. <ii>
  2. <Italics>
  3. <Italic>
  4. <I>

Answer

<I>

Reason — The <I> tag is used to make the text italic.

Question 8

What is the correct HTML tag for inserting a line break?

  1. <BR>
  2. <LB>
  3. <Break>
  4. <Newline>

Answer

<BR>

Reason — The <BR> tag is used for inserting a line break.

Question 9

An HTML ............... consists of an ON tag, the content, and an OFF tag.

  1. Element
  2. Tag
  3. Attribute
  4. None of these

Answer

Element

Reason — An HTML element consists of an ON tag, the content, and an OFF tag.

Question 10

Which character is used with the OFF tag?

  1. end
  2. /
  3. \
  4. <

Answer

/

Reason — The / character is used with the OFF tag.

Question 11

The default colour of LINK attribute is ............... .

  1. Red
  2. Black
  3. Green
  4. Blue

Answer

Blue

Reason — The default colour of LINK attribute is blue.

Question 12

The entity which displays an '&' sign on the browser is ............... .

  1. &
  2. <&AMP>
  3. &AMP
  4. None of these

Answer

&AMP

Reason — The entity which displays an '&' sign on the browser is &AMP.

Question 13

Which entity displays the ">" (greater than) sign on the browser?

  1. <& GT>
  2. &GT
  3. & GRT
  4. None of these

Answer

&GT

Reason — The &GT entity displays the ">" (greater than) sign on the browser.

Question 14

The HTML tag for the largest heading is ............... .

  1. <H1>
  2. <H6>
  3. <HEAD>
  4. None of these

Answer

<H1>

Reason — The HTML tag for the largest heading is <H1>.

Question 15

Which tag is used to define the basic font size for the whole document?

  1. <BASEFONT>
  2. <COLOR>
  3. <FONT>
  4. <SIZE>

Answer

<BASEFONT>

Reason — The <BASEFONT> tag is used to define the basic font size for the whole document.

Question 16

The default value of Type attribute for an unordered list is ............... .

  1. Disc
  2. Square
  3. Circle
  4. None of these

Answer

Disc

Reason — The default value of Type attribute for an unordered list is disc.

Question 17

Which of the following tags is suitable for creating a numbered list?

  1. <BL>
  2. <OL>
  3. <UL>
  4. None of these

Answer

<OL>

Reason — The <OL> tag is suitable for creating a numbered list.

Question 18

To display (X+Y)2, the correct HTML code is:

  1. <SUB> (X+Y)2 </SUB>
  2. X+Y<SUP> 2 </SUP>
  3. (X+Y) <SUP> 2 </SUP>
  4. <SUP> (X+Y) 2 </SUP>

Answer

(X+Y) <SUP> 2 </SUP>

Reason — To display (X+Y)2, the correct HTML code is (X+Y) <SUP> 2 </SUP>.

Question 19

What is the full form of DTD?

  1. Document To Definition
  2. Dynamic To Definition
  3. Document Type Definition
  4. Direct Type Definition

Answer

Document Type Definition

Reason — The full form of DTD is Document Type Definition.

Question 20

Anything written between ............... is taken as a comment.

  1. <?-->
  2. <?- --?>
  3. <!-- and -->
  4. </--->

Answer

<!-- and -->

Reason — Anything written between <!-- and --> is taken as a comment.

Question 21

To start a list with alphabet 'E', which line should be used?

  1. <OL type="A">
  2. <OL type="A" start= "5" >
  3. <OL type="E" >
  4. <OL start="E" >

Answer

<OL type="A" start= "5" >

Reason — To start a list with alphabet 'E', we write the following code:

<OL type="A" start= "5" >

Question 22

Which of the following is a text editor?

  1. Notepad
  2. Wordpad
  3. Both 1 and 2
  4. None of these

Answer

Both 1 and 2

Reason — Notepad and Wordpad both are text editors.

Fill in the Blanks

Question 1

The ............... section contains the content to be displayed on the web page.

Answer

The <BODY> section contains the content to be displayed on the web page.

Question 2

The ............... editor provides various tools and graphical interface where the web pages are designed.

Answer

The WYSIWYG editor provides various tools and graphical interface where the web pages are designed.

Question 3

............... and ............... are attributes of the <HR> tag.

Answer

Size and Width are attributes of the <HR> tag.

Question 4

The colour of the text in the HTML document can be changed using the ............... attribute of the Font tag.

Answer

The colour of the text in the HTML document can be changed using the Color attribute of the Font tag.

Question 5

The FACE attribute of the ............... tag is used to change the typeface or the name of the font.

Answer

The FACE attribute of the <FONT> tag is used to change the typeface or the name of the font.

Question 6

The ............... attribute of Body tag defines the colour of the visited links in a document.

Answer

The <VLINK> attribute of Body tag defines the colour of the visited links in a document.

Question 7

The ............... attribute of Body tag changes the colour of the Active link.

Answer

The <ALINK> attribute of Body tag changes the colour of the Active link.

Question 8

The three values that can be defined with ............... tag are disc, square, and circle.

Answer

The three values that can be defined with <UL> tag are disc, square, and circle.

Question 9

To specify the start value of the first item from which an ordered list should start, the ............... attribute is used.

Answer

To specify the start value of the first item from which an ordered list should start, the Start attribute is used.

Question 10

A list created within a list is called ............... list.

Answer

A list created within a list is called nested list.

Question 11

The default colour of a hyperlink on a web page is ............... .

Answer

The default colour of a hyperlink on a web page is blue.

Question 12

The ............... tag is used to create subscripts and ............... tag is used to create superscripts on a web page.

Answer

The <SUB> tag is used to create subscripts and <SUP> tag is used to create superscripts on a web page.

Question 13

The ............... attribute is used to define the thickness of horizontal rule.

Answer

The Size attribute is used to define the thickness of horizontal rule.

Question 14

The ............... tag is used to insert line break on a web page.

Answer

The <BR> tag is used to insert line break on a web page.

State True or False

Question 1

The title of a document can contain maximum 64 characters.

Answer

True

Reason — The title should be short and include only upto 64 characters.

Question 2

The Heading levels are part of the <HEAD> tag.

Answer

False

Reason — The Heading levels are part of the <BODY> tag.

Question 3

The Vlink tag defines the colour of the link after it has been visited.

Answer

True

Reason — The Vlink attribute defines the colour of the link after it has been visited.

Question 4

A list can be defined in different styles.

Answer

True

Reason — A list can be defined as a ordered list, unordered list or as a definition list.

Question 5

The default value for <OL> is a filled circle.

Answer

False

Reason — The default value for <UL> is a filled circle or disc.

Question 6

You can start the ordered list with a different number.

Answer

True

Reason — We can start the ordered list with a different number which we can specify using the start attribute.

Question 7

The colour of the hyperlinks in an HTML document cannot be changed.

Answer

False

Reason — The Link, Alink and Vlink attributes of the body tag control the colours of the hyperlinks.

Question 8

There must be only one <title> tag in an HTML document.

Answer

True

Reason — There must be only one <title> tag in an HTML document and it is defined within the <HEAD> tag.

Question 9

Unordered list type creates a bulleted list.

Answer

True

Reason — Unordered list type creates a bulleted list with bullets like disc, circle or square.

Question 10

Physical structure refers to different parts of a document, i.e., how a document is built.

Answer

True

Reason — Physical structure refers to the arrangement and organization of different parts of the document, including elements like headings, paragraphs, lists, tables, images, and more.

Answer in One Word or a Sentence

Question 1

What does W3C stand for?

Answer

World Wide Web Consortium

Question 2

Which elements have both starting and ending tags?

Answer

Container elements

Question 3

How many heading levels can be defined in HTML?

Answer

Six heading levels starting from <H1> to <H6>.

Question 4

Write the tag which is used as a separator between blocks of text.

Answer

<HR>

Question 5

Which attribute of HTML tag specifies the language used within the document?

Answer

Lang attribute

Question 6

What is the utility of <P> tag?

Answer

Marks a block of text as a paragraph

Question 7

Which tag is used to set Font Face, Size, Color, and other attributes for the whole HTML document?

Answer

<BASEFONT>

Question 8

What type of lists are supported by HTML?

Answer

Unordered, Ordered and Definition

Question 9

Name any one software for each of the following categories:

a. Text Editor

b. Web Browser

Answer

a. Notepad

b. Google Chrome

Short Answer Type Questions

Question 1

Define the <BODY> tag in HTML.

Answer

The <BODY> tag is the largest part of the HTML document. It contains the content that appears on a web page when viewed in a browser. Within the <BODY> tag, various formatting elements can be incorporated, such as images, headings, lists, and hypertext links to enhance the appearance of a web page.

Question 2

Define the term Hyperlink.

Answer

Hyperlink is a highlighted text segment or image that connects to other pages on the web.

Question 3

Differentiate between Container and Empty elements in HTML. Give any two examples of HTML tags from each category.

Answer

Container elementsEmpty elements
Container elements require both, an opening and a closing tag.Empty elements require only an opening tag and not a closing tag.
Container elements affect the text appearing between their opening and a closing tag.Empty elements just carry out the job assigned to them.
For example, <TITLE>…</TITLE>, <FONT>…</FONT> etc.For example, <BR>, <HR> etc.

Question 4

Which attribute allows you to change the style of numbers in an ordered list?

Answer

'Type' attribute.

Question 5

What is an attribute in HTML?

Answer

An attribute is a property that provides additional information about an HTML element. It enhances the functionality of a tag and is always specified inside the opening tag.

Question 6

Which heading element gives the most prominent heading?

Answer

<H1> tag gives the most prominent heading.

Question 7

Write names of two attributes each for the following tags:

  1. <FONT>
  2. <BODY>

Answer

  1. Two attributes of <FONT> tag are Face and Size.
  2. Two attributes of <BODY> tag are Bgcolor and Background.

Question 8

Identify which of the following is a tag or an attribute:

  1. HR
  2. align
  3. BR
  4. Text
  5. P
  6. Noshade

Answer

  1. HR — Tag
  2. align — Attribute
  3. BR — Tag
  4. Text — Attribute
  5. P — Tag
  6. Noshade — Attribute

Question 9

Write an HTML code to create the following ordered list.

C. Apples
D. Oranges
E. Grapes

Answer

<HTML>
<BODY>
<OL TYPE = "A" START = "3">
<LI>Apples</LI>
<LI>Oranges</LI>
<LI>Grapes</LI>
</OL>
</BODY>
</HTML>

Question 10

Write an HTML code to create the following bulleted list.

  • MS Word
  • MS Excel
  • MS PowerPoint
  • MS Access

Answer

<HTML>
<BODY>
<UL TYPE = "CIRCLE">
<LI>MS Word</LI>
<LI>MS Excel</LI>
<LI>MS PowerPoint</LI>
<LI>MS Access</LI>
</UL>
</BODY>
</HTML>

Question 11

Find the errors in the following HTML code and write the correct code.

<UL Style: Square> <LI> Water Bottles <LI> Lunch Box <LI> Handkerchief </OL>

Answer

The errors in the given code are as follows:

  1. The name of the attribute should be 'Type' and not 'Style'.
  2. The attribute is followed by an '=' symbol and not a ':' symbol.
  3. <LI> tags should be closed with </LI>
  4. The closing tag should be </UL> instead of </OL>.

The correct code is as follows:

<UL Type= "Square"> 
<LI>Water Bottles</LI> 
<LI>Lunch Box</LI> 
<LI>Handkerchief</LI> 
</UL>

Question 12

Identify error(s) in the following HTML code and write the correct code.

<OL Type= "a" Start= "d">

Answer

The error in the given code is that the value of start attribute should be numeric. Thus, for the list to start with 'd', the value of start attribute must be set to '4'.

The correct code is as follows:

<OL Type= "a" Start= "4">

Long Answer Type Questions

Question 1

Write a short note on web browser.

Answer

A web browser is essential software used for accessing websites and serves as an interface between users and the World Wide Web. Web browsers come in various forms, including those with graphical user interfaces like Internet Explorer, Mozilla Firefox, Google Chrome, Opera, as well as text-based browsers such as Lynx.

They are typically installed on individual computers, enabling users to effortlessly explore files, folders, and websites through hyperlinks. Multiple tabs and windows within the same browser can be opened simultaneously, enhancing user experience.

Web browsers offer an array of features and functionalities, including the ability to download content, save bookmarks for easy access, and manage passwords securely. They also provide tools like spell-checking, integrated search engine toolbars, tabbed browsing for efficient multitasking, ad-blocking features, accessibility through HTML access keys, and pop-up blocking to enhance browsing safety and convenience.

Question 2

Differentiate between Block-level elements and Text-level elements.

Answer

Block-level elementsText-level elements
Block level elements take up the full width available and by default, begin on a new line.Text level elements are used to markup the bits of text, including changing the text appearance or creating hyperlinks. They do not start on a new line and only take up as much width as necessary.
For example, <P> tag, <HR> tag etc.For example, <B> tag, <I> tag etc.

Question 3

What is the difference between <B> and <BR> tags?

Answer

<B> tag<BR> tag
This tag is used for making the text bold.This tag is used to insert a line break.
It is a container element.It is an empty element.
E.g.
<b>This text is bold.</b>
E.g.
This is some text <br> on a new line.

Question 4

How can we display <, > and & symbols on a web page?

Answer

We can display the given symbols on a web page using the following character entities:

SymbolCharacter
Entities
<&lt
>&gt
&&amp

Question 5

Differentiate between Ordered and Unordered list with the help of an example.

Answer

Difference between Ordered and Unordered list:

S.
No.
Ordered ListUnordered List
1.The ordered list is used to display the list of items in a specific order.The unordered list is used when the items are not to be displayed in any particular order.
2.<OL> tag is used to create ordered list.<UL> tag is used to create unordered list.
3.E.g.
<OL>
<LI>Apple</LI>
<LI>Mango</LI>
<LI>Banana</LI>
</OL>

Output
  1. Apple
  2. Mango
  3. Banana
E.g.
<UL>
<LI>Apple</LI>
<LI>Mango</LI>
<LI>Banana</LI>
</UL>

Output
  • Apple
  • Mango
  • Banana

Question 6

What do you mean by nesting of list?

Answer

A list created within a list is called a Nested list. Ordered and Unordered list can be nested within each other to form a multilevel list. To create a nested list, we add a new list within a list. Consider the given example,

<OL>
<LI> Input Devices
    <UL>
    <LI> Keyboard </LI> 
    <LI> Mouse </LI>
    <LI> Joystick </LI>
    </UL>
<LI> Output Devices
    <UL>
    <LI> Monitor </LI> 
    <LI> Speaker </LI>
    <LI> Printer </LI>
    </UL>
</OL>

The nested list will be displayed as follows:

  1. Input Devices
    • Keyboard
    • Mouse
    • Joystick
  2. Output Devices
    • Monitor
    • Speaker
    • Printer

Question 7

What is the function of Definition List? Explain its structure with the help of an example.

Answer

Definition lists are used to outline the multiple terms and their descriptions one after another, as in a glossary and other name or value lists. It starts and ends with <DL> and </DL> tag respectively. The <DL> tag is used in conjunction with <DT> (Definition Term) and <DD> (Definition Description) tags where:

  1. <DT> helps in defining the terms or names.
  2. <DD> helps in describing each term or name.

Consider the following example,

<DL>
<DT>DNA</DT>
<DD>DNA stands for Deoxyribonucleic acid. It is the hereditary material in humans and almost all other organisms.</DD>
<DT>RNA</DT>
<DD>RNA stands for Ribonucleic acid. It acts as a messenger between DNA and the protein synthesis complexes known as ribosomes.</DD>
</DL>

The given HTML code is displayed in the following way:

DNA
DNA stands for Deoxyribonucleic acid. It is the hereditary material in humans and almost all other organisms.
RNA
RNA stands for Ribonucleic acid. It acts as a messenger between DNA and the protein synthesis complexes known as ribosomes.

Question 8

Discuss the use of <UL> and <LI> tags with suitable examples of each.

Answer

The <UL> tag is used to define an unordered list. It indents each item in the list and adds a bullet against each of them. The <LI> tag is used to display the listed items in an unordered or ordered list.

Consider the following example,

<HTML>
<BODY>
FRUITS
<UL>
<LI>Mango</LI>
<LI>Apple</LI>
<LI>Guava</LI>
<LI>Banana</LI>
</UL>
</BODY>
</HTML>

The list is displayed as follows:

FRUITS

  • Mango
  • Apple
  • Guava
  • Banana

Application Based Questions

Question 1

Mihir wants to know the name of any two text editors that can be used to write the code for an HTML webpage. Can you provide him with the names?

Answer

The two text editors that can be used to write the code for an HTML webpage are Notepad and Wordpad.

Question 2

Write the HTML code for the following in the space provided.

  1. A normal sized heading with the text, "LOYOLA HIGH SCHOOL."
  2. The largest size heading, "PETER PAN"
  3. A normal sized heading, "A MUSICAL"
  4. A horizontal line across the page

Answer

a. <H3> LOYOLA HIGH SCHOOL. </H3>

b. <H1> PETER PAN </H1>

c. <H3> A MUSICAL </H3>

d. <HR>

Question 3

Find error(s) in the following HTML code segment. Rewrite the correct code and underline the corrections made.

<UL STYLE: square>
<LI> Water Bottles
<LI> Lunch box
<LI> Handkerchief
</OL>

Answer

The errors in the given code are as follows:

  1. The name of the attribute should be 'Type' and not 'Style'.
  2. The attribute is followed by an '=' symbol and not a ':' symbol.
  3. <LI> tags should be closed with </LI>
  4. The closing tag should be </UL> instead of </OL>.

The correct code is as follows:

<UL Type= "Square"> 
<LI>Water Bottles</LI> 
<LI>Lunch Box</LI> 
<LI>Handkerchief</LI> 
</UL>

Question 4

6CO2 + 6H2O → C6H12O6 + 6O2

To display the above given chemical expression on a web page, the following HTML code was written:

6CO<sup>2</sup> + 6H<sup>2</sup>O →
C<sup>6</sup>H<sup>12</sup>O<sup>6</sup> + 6O<sup>2</sup>

But it's not displaying the expression in desired format. Identify the fault(s) and suggest the required correction(s).

Answer

<SUB> tag is used to write a text as a subscript and <SUP> tag is used to write a text as a superscript. The given chemical expression should be written using <SUB> tag instead of the <SUP> tag.

Thus, the given equation can be written correctly by writing the given HTML code:

6CO<SUB>2</SUB> + 6H<SUB>2</SUB>O →
C<SUB>6</SUB>H<SUB>12</SUB>O<SUB>6</SUB> + 6O<SUB>2</SUB>
PrevNext