Class 10 Exam  >  Class 10 Notes  >  Computer Application: Class 10  >  Assignment: HTML Basics

Assignment: HTML Basics | Computer Application: Class 10 PDF Download

Multiple Choice Questions

Q1. HTML is acronym for :
(a) High Text Marker Language
(b) Higher Text Markup Language
(c) Hyper Text Markup Language
(d) Hyper Transfer Makeup Language

Ans. (c) Hyper Text Markup Language
HTML is acronym for Hyper Text Markup Language.

Q2. Which of the following tags identifies the document as an HTML document?
(a) <HEAD>
(b) <HTML>
(c) <BODY>
(d) <P>

Ans. (b) <HTML>
<HTML> tag identifies the document as an HTML document. An HTML document begins with <HTML> and ends with </HTML>.

Q3. Which sequence of HTML tags is correct ?
(a) <html><head><title></title></head><body></body></html>
(b) <html><head><title><body></title></head></body></html>
(c) <html><head><title</head><body></body>></title></</html>
(d) <html><head><title><body></body></title></head></html>

Ans. (a) <html><head><title></title></head><body></body></html>
The correct document structure of an HTML document is <html><head><title></title></head><body></body></html>.

Q4. To define the basic font size, which of following tag is used ?
(a) SIZE
(b) BASEFONT
(c) FONT
(d) All of these

Ans. (b) BASEFONT
The <BASEFONT> tag lets us define the basic size for the font, which the browser uses for text with no defined font size.

Q5. We can create a numbered list using the ............... tag.
(a) <UL>
(b) <list>
(c) <OL>
(d) <DL>

Ans. (c) <OL>
We can create a numbered list using the <OL> tag.

Q6. In <OL> and <UL>, the style of bullet or number is defined by ................. .
(a) type attribute
(b) style attribute
(c) both (1) and (2)
(d) None of the above

Ans. (a) type attribute
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.

Q7. Tag(s) required to create Description lists in HTML:
(a) <DL>
(b) <DT>
(c) <DD>
(d) All of the above

Ans. (d) All of the above
A definition list <DL> usually consists of an alternating definition term <DT> and a definition description <DD>.

Q8. Factors that affect how an HTML document looks on the monitor do not include:
(a) operating system
(b) window size
(c) color depth
(d) html tags

Ans. (a) operating system
Factors that affect how an HTML document looks on the monitor do not include operating system.

Q9. Which of these is NOT an attribute of the font tag ?
(a) color
(b) face
(c) type
(d) size

Ans. (c) type
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.

Q10.  Which attribute is NOT valid for the <body> tag ?
(a) background
(b) color
(c) vlink
(d) bgcolor

Ans. (b) color
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.

Theoretical Questions

Q1. What do you understand by 'Tag' ?

Ans.  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>

Q2. What is an attribute in HTML ?

Ans.  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">

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

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

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

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

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

Ans. 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).

Q6. List and define different types of paragraph alignments.

Ans. 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.

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

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

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

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

Q9. 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.

Ans.

<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>

Q10. What is wrong in the following coding ?
<FONT name = "Arial", 
type = "Bold" size = 3>

Ans. 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">

Q11. What is wrong in the following coding ?
<FONT color = #345678

Ans.  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">

Q12. What is wrong in the following coding ?
<P Font face = "Arial" color = "Blue">

Ans. 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">

Q13. What is wrong in the following coding ?
<BASEFONT SIZE = 5> 
<BODY> Text with New format 
</BODY>

Ans.  <BASEFONT> tag should be inside the <BODY> tag.
The correct code is as follows:

<BODY>

<BASEFONT SIZE = 5> 

Text with New format 

</BODY>

Q14. Differentiate between container and empty elements.

Ans.

Assignment: HTML Basics | Computer Application: Class 10

Q15. List and explain the different attributes of body tag.

Ans.  The different attributes of body tag are as follows:

  • alink — It specifies the colour of an active link in a document.
  • background — It specifies a background image for the document.
  • bgcolor — It specifies the background colour of a document.
  • link — It specifies the colour of unvisited links in a document.
  • text — It specifies the colour of the text in a document.
  • vlink — It specifies the colour of visited links in a document.
  • leftmargin — It specifies the left margin in a document.
  • 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">

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

Ans. 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 -->

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

Ans. 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>

Q18. 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

Ans.

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

<HR>

<H1>Orbit</H1>

<H2>The Geometric Juggler</H2>

<HR>

Output

Assignment: HTML Basics | Computer Application: Class 10

Q19. 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.

Ans.

<HTML>

<HEAD>

    <TITLE> Foo Bar </TITLE>

</HEAD>

<BODY>

    <H1> Happy Hour at the Foo Bar </H1>

    <P>Come on down!</P>

</BODY>

</HTML>

Output

Assignment: HTML Basics | Computer Application: Class 10

Q20. Differentiate between ordered and unordered lists.

Ans.
Assignment: HTML Basics | Computer Application: Class 10

The document Assignment: HTML Basics | Computer Application: Class 10 is a part of the Class 10 Course Computer Application: Class 10.
All you need of Class 10 at this link: Class 10
15 videos|131 docs|18 tests

FAQs on Assignment: HTML Basics - Computer Application: Class 10

1. What is HTML and why is it important in web development?
Ans.HTML, or HyperText Markup Language, is the standard language used to create and design documents on the World Wide Web. It structures the content on a webpage, allowing developers to define elements such as headings, paragraphs, links, images, and more. Understanding HTML is crucial for web development as it forms the backbone of web pages, enabling browsers to render content correctly for users.
2. What are the basic components of an HTML document?
Ans.An HTML document typically consists of several key components: the `<!DOCTYPE html>` declaration, which defines the document type; the `<html>` tag, which wraps all content; the `<head>` section, which contains meta-information such as the title and links to stylesheets; and the `<body>` section, where the actual content that appears on the webpage is placed, including text, images, and other media.
3. How do HTML tags work and what are some commonly used tags?
Ans.HTML tags are the building blocks of an HTML document. They are enclosed in angle brackets and usually come in pairs: an opening tag (e.g., `<p>`) and a closing tag (e.g., `</p>`). Some commonly used tags include `<h1>` to `<h6>` for headings, `<p>` for paragraphs, `<a>` for links, `<img>` for images, and `<div>` for block-level content organization. These tags help structure content and improve accessibility.
4. What is the purpose of attributes in HTML tags?
Ans.Attributes provide additional information about HTML elements and modify their behavior or appearance. They are included in the opening tag and typically come in name-value pairs (e.g., `<a href="https://example.com">`). Common attributes include `href` for links, `src` for images, and `alt` for alternative text. Using attributes effectively enhances the functionality and accessibility of web pages.
5. How can I ensure my HTML code is valid and well-structured?
Ans.To ensure HTML code is valid and well-structured, developers can use several best practices: validate the code using online validation tools like the W3C Markup Validation Service, follow proper nesting rules (ensuring tags are opened and closed correctly), use semantic HTML tags (like `<article>` and `<section>`), and keep the code organized with appropriate indentation. Regular testing in different browsers also helps ensure compatibility and performance.</section></article></a></div></a></h6></h1></body></head></html>
Related Searches

Previous Year Questions with Solutions

,

Viva Questions

,

Objective type Questions

,

Extra Questions

,

pdf

,

mock tests for examination

,

Semester Notes

,

Sample Paper

,

Assignment: HTML Basics | Computer Application: Class 10

,

Assignment: HTML Basics | Computer Application: Class 10

,

ppt

,

practice quizzes

,

Important questions

,

past year papers

,

Exam

,

Assignment: HTML Basics | Computer Application: Class 10

,

shortcuts and tricks

,

study material

,

Free

,

Summary

,

video lectures

,

MCQs

;