More Elements in HTML: A. Multiple Choice Questions | PDF | Html Element | Html
100% found this document useful (1 vote)
169 views5 pages

More Elements in HTML: A. Multiple Choice Questions

This document provides multiple choice questions, fill in the blanks questions, true/false statements, and short answer questions about HTML elements and tags. It tests knowledge of tags like <BR>, <STRONG>, <HR>, and attributes like ALIGN, NOSHADE, and COLOR. The last section provides an example webpage and asks the reader to write the HTML code to generate it, demonstrating formatting with different fonts, sizes, colors, and alignments.

Uploaded by

GABBAR GAMING
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
169 views5 pages

More Elements in HTML: A. Multiple Choice Questions

This document provides multiple choice questions, fill in the blanks questions, true/false statements, and short answer questions about HTML elements and tags. It tests knowledge of tags like <BR>, <STRONG>, <HR>, and attributes like ALIGN, NOSHADE, and COLOR. The last section provides an example webpage and asks the reader to write the HTML code to generate it, demonstrating formatting with different fonts, sizes, colors, and alignments.

Uploaded by

GABBAR GAMING
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Chapter 8

3
More Elements in HTML
A. Multiple choice questions:
1. The tag used to force a line break is_____________.
a. <BR> b. <LINE> c. <BREAK> d. <HR>
Ans. a. <BR>
2. The <STRONG>…</STRONG> tag is used to make a text __________.
a. Italics b. Underline c. Bold d. Left Aligned
Ans. c. Bold
3. If the ALIGN attribute of the paragraph tag is missing then default alignment for the paragraph tag
would be _____________.
a. JUSTIFY b. CENTER c. RIGHT d. LEFT
Ans. d. LEFT
4. The number of header elements that can be used in a HTML file is _____________.
a. 3 b. 4 c. 5 d. 6
Ans. d. 6
5. The default font for a page should be provided using ________________ tag.
a. FONT b. BASEFONT c. DEFAULTFONT d. None of these
Ans. b. None of these
6. Which one of the following is an empty tag?
a. <P> b. <B> c. <BR> d. <I>
Ans. c. <BR>
7. Which of the following tag is used to change the default font of a web page?
a. FONT b. DEFAULTFONT c. BASEFONT d. FONTFACE
Ans. c. BASEFONT
8. Which of the following is not true for the <HR> tag?
a. It draws a horizontal line of certain width.
b. The default alignment of <HR> tag is CENTER.
c. The width of the horizontal rule cannot be changed.
d. The height of the horizontal rule can be changed.
Ans. c. The width of the horizontal rule cannot be changed.
9. Which of the following of the <HR> tag is used to create a horizontal rule without any shading?
a. TRANSPARENT b. SHADENO c. NOFILL d. NOSHADE
Ans. d. NOSHADE

36
10. What should be the value of the ALIGN attribute that aligns both the left and right margin?
a. LEFT b. RIGHT c. CENTER d. JUSTIFY
Ans. d. JUSTIFY
B. Fill in the blanks:
1. The SIZE attribute of the HR tag is used to specify the height.
2. The NOSHADE attribute of the <HR> tag is used to draw a horizontal rule without a shade.
3. The default alignment of a paragraph is LEFT.
4. There are six header elements that are used to provide headers in varied text sizes based on the
header level.
5. The U tag is used to underline a text.
6. The <STRONG> tag is used to make text Bold.
7. The header tag <H1> has the largest font in terms of size.
8. The JUSTIFY alignment gives a proportionate left and right margin.
9. The WIDTH attribute of the <HR> tag allows you to draw a horizontal line with lesser width.
10. The COLOR attribute of the <HR> tag is used to render a horizontal rule with a colour as specified
in this attribute.
C. State whether the following statements are true or false:
1. You cannot change the default colour of the default font in html. [False]
2. The FONT tag is used to specify the base font for the document to use. [False]
3. You cannot change the size of a font in html. [False]
4. The HR tag is used to force a line break in HTML. [False]
5. The BODY tag is an empty tag. [False]
6. You cannot change the default font of a page. [False]
7. The TRANSPARENCY attribute of the <HR> tag is used to draw a horizontal rule without any
shade. [False]
8. The alignment of a paragraph is by default right-aligned. [False]
9. There are six different levels of header tags. [True]
10. The <BASEFONT> tag always supersedes the <FONT> tag. [False]
D. Answer the following questions:
1. Who was the developer of HTML language?
Ans. Tim Berners Lee was the developer of HTML.
2. What is an empty tag?
Ans. A tag which stands alone that is which do not have a closing tag is called empty tag.
3. What is the BODY tag in HTML used for?
Ans. The BODY tag is used to hold all the contents of a web page i.e. words, pictures, artwork and
other stuff.
4. What is Tiling with reference to background images?
Ans. The replication of an image on the web browser is called Tiling.
37
5. What are HTML tags used for?
Ans. Tags in HTML are used to separate out normal text from HTML code, which are enclosed
within <angle-brackets>. This tags are used as HTML commands which makes the web
browser perform the given task.
6. State the rules for coding in HTML.
Ans. Rules for coding in HTML:
1. Every HTML tag should be surrounded by angular brackets < and >.
2. The words/letters between these two angular brackets are called elements. These are the
coded commands within HTML. Elements tell the browser how to display the web page.
3. HTML is also not case sensitive. That means, you can use either lowercase or uppercase
characters.
7. State the difference between Container and Empty tags.
Ans. HTML tags that need to be closed with </> command is called container tag. For example
<B> and </B> is a container tag and also described as a nested tag. And the tags that don’t
need to be closed with </> command is called an empty tag. For example <br>, <hr> are the
empty tags they don’t need to be closed with </ > command.
8. Even though Comments are ignored by the compiler why do you think comments are required
in an HTML page?
Ans. HTML comments allow you to write notes about the code, hide old information, and hold
reminders on the page. Comments are not seen by the people viewing the web page.
9. What are Headers? Write the header tag to display a level 2 heading “Computer” which should
be center aligned.
Ans. Headers are a simple form of text formatting that allows us to give
a heading to a page or headings to a new section or subsection of a
page. The six header elements (H1 through H6) are used to provide
headers in varied text sizes based on the header level.
<H2 ALIGN= “CENTER”> Computer </H2>
10. What is the paragraph element in HTML used for? Name two attributes of the paragraph tag
and its use.
Ans. The paragraph tag (<P>…</P>) is used to define a paragraph in HTML.
All text placed between the <P>…</P> tags from all other material on the page by a line of
vertical space both before and after the paragraph.
Attributes of the paragraph tag:
1. <P ALIGN= “LEFT”>…</P>: Aligns a paragraph content to the left.
2. <P ALIGN= “RIGHT”>…</P>: Aligns a paragraph content to the right.
11. Write HTML tags as directed:
a. Use the FONT tag to display “This text is in blue colour.” In blue colour.
b. Change the given text to bold and italics “This text is in bold and italics”.

38
Ans. a. <FONT COLOR=“RED”> This text is in blue colour.</FONT>
b. <B><I> This text is in bold and italics</I></B>
12. Identify the errors and write the corrected HTML statements:
a. <BODY BACKGROUND=“RED”>
b. <FONT TYPE=“Arial”>
Ans. a. <BODY BGCOLOR=“RED”>
b. <FONT FACE= “Arial”>
E. Application-based question:
Observe the following web page and write the HTML code to generate it.
Note the following points while generating the web page:
• Title of the page should be “Basic HTML Examples”.

HTML
HTML stands for Hyper-Text Mark-up Language. It is a
computer language which is devised for website creation. These
websites can be viewed by anyone else connected to the Internet
with a browser. It was developed in the year 1990 by scientist
Sir Timothy John ‘Tim’ Berners-Lee of England.
This is an example of Bookman Old Style of font size 14.
This is an example of Bold Text.
This text is in italics but right aligned.
This text is centered, underlined and bold.

• The default font style for the page should be “Times New Roman” of size 12 and
BLUE in colour.
• The text “HTML stands for … of England” should be defined in a paragraph of
GREEN colour and should be having JUSTIFY alignment.
• The Horizontal Rule should be RED in colour of height 2.
• The 4 lines just after the horizontal rule should be discrete lines (i.e. not in a
paragraph) but with line break having the following characteristics:
ο The first line should be left aligned and should have the font style as “Bookman Old
Style” of size 14 and MAGENTA in colour.
ο The second line should be left aligned but bold text in default font.
ο The third line should be in italics but right aligned with the “Bookman Old Style”
font.
ο The fourth line should be bold and underlined and should have the alignment
centered.
Ans.
<HTML>

39
<HEAD>
<TITLE>Basic HTML Examples</TITLE>
<BASEFONT FACE=“Times New Roman” COLOR=“BLUE” SIZE=“12”>
</HEAD>
<BODY>
<H1 ALIGN= “CENTER”>HTML</H1>
<P ALIGN= “JUSTIFY”>
<FONT COLOR= “GREEN”>
HTML stands for Hyper-Text Mark-up language. It is a computer language which is devised
for website creation. These websites can be viewed by anyone else connected to the Internet
with a browser. It was developed in the year 1990 by scientist Sir Timothy John ‘Tim’
Berners-Lee of England.
</FONT>
</P>
<HR SIZE= “2” COLOR= “RED”>
<FONT FACE= “Bookman Old Style” SIZE= “14”>
This is an example of Bookman Old Style of font size 14.
</FONT>
<BR>
<B>This is an example of Bold Text.</B>
<BR>
<P ALIGN= “RIGHT”>
<I>This text is in italics but right aligned.</I>
</P>
<BR>
<P ALIGN= “CENTER”>
<U><B>This text is centered, underlined and bold.</B></U>
</P>
</BODY>
</HTML>

40

You might also like