CBSE Class 10 Foundation of Information Technology: HTML NCERT Solutions

NCERT Solutions PDF Class 10 PDF

This resource provides detailed NCERT Solutions for Class 10 Foundation of Information Technology, focusing on Chapter 5: HTML (HyperText Markup Language). It covers fundamental concepts of HTML, including expanding the acronym, identifying container and empty elements, file extensions, and viewing source code. The solutions explain how to set background images and colors, differentiate between attributes like 'bgcolor' and 'background', and recognize common graphic file formats. It also delves into attributes for the BODY tag such as 'alink' and 'vlink', and how to modify text and link colors. Furthermore, it touches upon changing font sizes and understanding the purpose of attributes like 'width'. These solutions are designed to help students grasp the core principles of HTML, essential for building web pages, and prepare effectively for their examinations by clarifying each concept with clear explanations and examples.

Quick info

BoardCBSE
ClassClass 10
SubjectFoundation of Information Technology
Session2026
LanguageEnglish
TypeNCERT Solutions
Chapter5. HTML (HyperText Markup Language)

Chapter summary

This chapter's NCERT Solutions for Class 10 Foundation of Information Technology focus on HTML (HyperText Markup Language). It covers the expansion of HTML, distinguishes between container and empty elements, and explains file extensions. Solutions detail how to view source code, set background images and colors using attributes like 'background' and 'bgcolor', and identify common image formats. The chapter also clarifies the use of BODY tag attributes such as 'alink', 'vlink', 'text', and 'width', and demonstrates how to alter font sizes. These solutions provide a foundational understanding of HTML for web page creation.

Learning outcomes

  • Understand the full form and purpose of HTML.
  • Differentiate between container and empty HTML elements.
  • Identify the correct file extension for HTML documents.
  • Learn how to view the source code of a web page.
  • Apply attributes like 'background' and 'bgcolor' to set page appearance.
  • Recognize common graphic file formats supported by browsers.
  • Explain the function of 'alink', 'vlink', and 'text' attributes in the BODY tag.
  • Understand how to modify font sizes and line widths in HTML.

Topics covered

Paper topics

  • HTML Expansion
  • Container Elements
  • Empty Elements
  • HTML File Extension
  • Viewing Source Code
  • Background Attributes (bgcolor, background)
  • Graphic File Formats
  • BODY Tag Attributes (alink, vlink, text)
  • Font Size Modification
  • Width Attribute

Important topics

  • HTML Basics and Expansion
  • Container vs. Empty Elements
  • Background and bgcolor Attributes
  • BODY Tag Attributes (alink, vlink, text)
  • HTML File Structure and Extensions

PDF preview

Read page by page below. PDF is streamed from the official NCERT website — no download button on this page.

Loading document …
Page of
Loading page …

Questions and Solutions

Question 1

HTML is a markup language. Expand the term HTML. (CBSE 2002)
Solution: HTML stands for HyperText Markup Language. This is the standard language used for creating web pages and structuring their content for display in web browsers.

Question 2

Give examples of a container element in HTML. (CBSE 2009)
Solution: Container elements in HTML are those that have both an opening tag and a closing tag, and they enclose content between them. Examples include:
  • <HEAD>...</HEAD>: Contains meta-information about the HTML document.
  • <TITLE>...</TITLE>: Specifies the title of the HTML document, shown in the browser's title bar or tab.
  • <BODY>...</BODY>: Contains the main content of the HTML document that is displayed in the browser window.

Question 3

Give the examples of an empty element in HTML. (CBSE 2010, 09)
Solution: Empty elements, also known as void elements, are HTML tags that do not have a closing tag and do not enclose any content. They typically perform a specific function. Common examples include:
  • <BR>: Inserts a single line break.
  • <HR>: Inserts a horizontal rule (a thematic break) across the page.

Question 4

Write the extension of an HTML code file. (CBSE 2005)
Solution: An HTML code file, which contains the markup language for a web page, is saved with the file extension .html or .htm.

Question 5

What is the method of viewing the source code of the current page in a Web browser?
Solution: To view the source code of the current web page you are visiting in most web browsers, you can typically right-click anywhere on the page. From the context menu that appears, select the option labeled "View Page Source" or a similar phrase.

Question 6

While writing HTML code, how do you find out how your Web page would look like? (CBSE 2007)
Solution: To preview how your HTML code will render as a web page, you need to open the HTML file using a web browser. Save your HTML code in a file with an .html or .htm extension, and then double-click the file or use the browser's "Open File" option to load it. The browser will interpret the HTML tags and display the page visually.

Question 7

Write the HTML code to set the image 'Pen.jpg' stored in the 'My Pictures' folder in C: as the background of your Web page. (CBSE 2007)
Solution: To set an image as the background of a web page, you use the `background` attribute within the `<BODY>` tag. The value of the attribute should be the complete path to the image file. For the specified image, the HTML code would be:

<BODY background="C:\My Pictures\Pen.jpg">

Note: In HTML code, backslashes in file paths are often represented as double backslashes (\) to ensure correct interpretation.

Question 8

Identify the error(s) in the following HTML code. Also, write the correct code. (CBSE 2008)

<BODY color="red" background ="school.j pg">

Solution: The errors in the provided HTML code are:
  1. The attribute `color` is not a valid attribute for the `<BODY>` tag to set the text color. The correct attribute for setting the main text color is `text`.
  2. There might be a space issue in the filename `school.j pg`. It should likely be `school.jpg`.
The correct code, assuming the intention was to set the background color to red and the background image to `school.jpg`, would be:

<BODY bgcolor="red" text="red" background="school.jpg">

If the intention was to set the main text color to red and use `school.jpg` as the background image, the corrected code is:

<BODY text="red" background="school.jpg">

However, the original answer implies the error was using `color` instead of `bgcolor`. If `bgcolor` was intended for the background color, and `school.jpg` is the correct filename, the corrected code is:

<BODY bgcolor="red" background="school.jpg">

Question 9

Write one basic difference between the `bgcolor` and `background` attributes.
Solution: The fundamental difference between the `bgcolor` and `background` attributes when used with the `<BODY>` tag is their function:
  • `bgcolor` attribute: This attribute is used to set a solid color as the background of the HTML document.
  • `background` attribute: This attribute is used to specify an image file that will be displayed as the background of the HTML document. If both attributes are used, the `background` image typically takes precedence.

Question 10

Name two common graphic file formats that most browsers recognize. (CBSE 2007)
Solution: Most modern web browsers are designed to recognize and display several common graphic file formats. Two of the most widely supported formats are:
  • .gif (Graphics Interchange Format)
  • .jpg or .jpeg (Joint Photographic Experts Group)
Other formats like .png are also commonly supported.

Question 11

What is the use of the `width` attribute in HTML? (CBSE 2002)
Solution: The `width` attribute in HTML is primarily used to specify the width of an element. When applied to a horizontal rule (`<HR>` tag), it defines the width of the line, which can be set either in pixels (e.g., `width="500"`) or as a percentage of the available space (e.g., `width="50%"`). If no width is specified for a horizontal rule, its default value is typically 100% of the available width.

Question 12

What do you understand by the `alink` attribute used with the `<BODY>` tag? (CBSE 2010, 04)
Solution: The `alink` attribute, which stands for "active link", is used within the `<BODY>` tag to define the color of a hyperlink while it is being actively clicked or activated by the user. When a user clicks on a link, its color temporarily changes to the color specified by `alink` before the page navigates. The default color for `alink` is typically red.

Question 13

What do you understand by the `vlink` attribute used with the `<BODY>` tag? (CBSE 2005, 04)
Solution: The `vlink` attribute, which stands for "visited link", is used within the `<BODY>` tag to specify the color of hyperlinks that the user has already visited. Once a user clicks on a link and navigates away from it, that link will then display in the color defined by the `vlink` attribute. The default color for `vlink` is typically purple.

Question 14

Explain the following statement: <BODY bgcolor="yellow" text ="red" vlink="blue"> (AI2010)
Solution: This HTML statement uses attributes within the `<BODY>` tag to define the visual appearance of the web page:
  • `bgcolor="yellow"`: This sets the background color of the entire web page to yellow.
  • `text="red"`: This sets the default color for all the main text content on the page to red.
  • `vlink="blue"`: This sets the color for all hyperlinks that have already been visited by the user to blue.
In summary, this code configures the page with a yellow background, red text, and blue color for visited links.

Question 15

How can the font size of a single line on a Web page be changed? (CBSE 2005)
Solution: The font size of a single line or specific text on a web page can be changed using HTML, although modern web design often prefers CSS for styling. One way to achieve this in older HTML versions is by using the `<FONT>` tag with the `size` attribute. For example, to change the font size of a line to size 5 (where sizes range from 1 to 7, with 3 being the default), you would use:

<FONT size="5">This line will have a larger font size.</FONT>

It's important to note that the `<FONT>` tag is deprecated in HTML5, and using CSS (e.g., `...`) is the recommended approach for controlling font sizes.

Common mistakes

  • Confusing 'color' attribute with 'bgcolor' for background color.
  • Incorrectly specifying file paths for background images.
  • Misunderstanding the difference between 'background' and 'bgcolor' attributes.
  • Using incorrect syntax for HTML tags and attributes.

Revision tips

  • Memorize the full form of HTML and key tag definitions.
  • Practice identifying container vs. empty elements.
  • Review the purpose of common BODY tag attributes like bgcolor, text, alink, and vlink.
  • Understand how to correctly specify image paths for background attributes.
  • Pay attention to the correct file extensions for HTML files.

Practice MCQs

Q1. What does HTML stand for?

Q2. Which of the following is an example of an empty HTML element?

Q3. What is the standard file extension for an HTML file?

Q4. Which attribute is used to set the background color of an HTML document?

Q5. Which attribute specifies an image as the background for an HTML document?

Q6. Which of these is a common graphic file format recognized by most browsers?

Q7. The 'vlink' attribute in the <BODY> tag defines the color of:

Frequently asked questions

What is HTML and what does it stand for?

HTML stands for HyperText Markup Language. It is a standard markup language used to create web pages and structure their content for display in web browsers.

What is the difference between a container element and an empty element in HTML?

A container element has both an opening and a closing tag (e.g., <BODY>...</BODY>) and encloses content. An empty element has only a single tag (e.g., <BR>) and does not enclose content.

How can I set a background image for my HTML page?

You can set a background image using the 'background' attribute within the <BODY> tag, like this: <BODY background="path/to/your/image.jpg">.

What is the purpose of the 'bgcolor' attribute?

The 'bgcolor' attribute is used within the <BODY> tag to specify the background color of the entire web page. For example: <BODY bgcolor="yellow">.

What do 'alink', 'vlink', and 'text' attributes control in HTML?

The 'text' attribute sets the color of the main text on the page. 'alink' sets the color of an active link (while it's being clicked), and 'vlink' sets the color of a link after it has been visited.

What are the common file extensions for HTML files?

The common file extensions for HTML files are.html and.htm.

Content reviewed by the NCERT Help team. Editorial Team and update policy

NCERT Solutions PDF PDF on NCERT Help. URL unchanged for search indexing.