Featured Post

Class 10 | Computer Science | Chapter 2 | HTML and CSS 3 (PART-1)

SEBA Class 10 Computer Science Solutions – 2025   

CLASS 10 - COMPUTER SCIENCE

CHAPTER 2 - HTML & CSS (PART 1)





IMPORTANT QUESTIONS:

1. What do you mean by web development or web programming?

Ans: Web programming or web development is the creation of dynamic wave applications.  example Facebook Amazon etc.


2. What are the two divisions of web development?

Ans: There are two broad divisions of web development

a. front end development or client side development

B. and back end development or server side development.


3. Define front end development.

Ans: Front end development refers to constructing what a user sees when they load a web applications that is the content design and how they interact with it. This is done with three codes HTML CSS and JavaScript.


4. What is the full form of HTML?

Ans: Hyper Text  Markup Language.


5. Define CSS.

Ans: CSS or cascading style sheet is a code for setting style rules for the appearance of web pages. CSS handles the cosmetic side of the web.


6. What is JavaScript?

Ans: JavaScript is a scripting language that's widely used to add functionality and interactivity to web pages.


7. What is HTML?

Ans: HTML is a special code for marking up text in order to turn it into a web page. Every web page on the net is written in HTML and it will form the backbone of any web application.


8. What are the advantages of HTML?

Ans: the advantages of learning HTML are:

a) Create website: by using HTML you can create a website or customise and existing web template.

b) Become a web designer: if you want to start a career as a professional Web designer HTML and CSS designing is a must skill.

c) Understand web: if you want to optimise website to boost its speed and performance it is good to know HTML to yield best results.

d) Learn other languages: once you understand the basic HTML then other related technology like JavaScript PHP etc are become easier to understand.


9. Who is called the father of HTML?

Ans. Tim Berners Lee is known as the father of HTML.


10. What is the latest version of HTML?

Ans: The latest version of HTML is HTML5.


11. Give some examples of software that are used to write HTML codes.

Ans: Notepad ++, notepad, VS Code, sublime text, etc


12. What are the basic building blocks of an HTML document?

Ans: An HTML document consists of its basic building blocks which are:

Tags-an HTML tag surrounds the content and apply meaning to it. It is written between < and > brackets.

Attribute - an attribute in HTML provides extra information about the element and it is applied within the start tag.

Elements-an HTML element is an individual component of an HTML file. In an HTML file everything written within tags are termed as HTML elements.


13. Write the rules for writing HTML codes.

Ans: The following rules must be followed while writing HTML codes

Container tags should always be closed properly.

Tag name should not contain spaces.

They are should not be any space between <and> in a tag.

Thanks must be nested correctly.


14. What is an external CSS? How can you write an external CSS?

Ans: An external style sheet is used to define the style for many HTML pages. To use an external style sheet add a link to eat in the <head > section of each HTML page.

i.e. <head>

<link rel="stylesheet" href="styles.css">

</head>


15. Write the advantages of CSS.

Ans:

               By using CSS you simply got to specify a repeated style for element once and use it multiple times as because CSS will automatically apply the required styles.

              The main advantage of CSS is that style is applied consistently across variety of sites

              If you are using CSS you do not need to write HTML tag attributes every time.

              Cascading style sheet simplifies the maintenance time.

              It is less complex and the efforts are significantly reduced.


16. Write the steps to create a table in HTML.

Ans: The steps to create a table in HTML:

Step 1: Define the Table

Use the `<table>` tag to define the table.

Step 2: Define Table Rows

Use the `<tr>` tag to define each table row.

Step 3: Define Table Headers

Use the `<th>` tag to define table headers.

Step 4: Define Table Data

Use the `<td>` tag to define table data.

Example

<table border="1">

  <tr>

    <th>Name</th>

    <th>Age</th>

  </tr>

  <tr>

    <td>Monali</td>

    <td>16</td>

  </tr>

  <tr>

    <td>Priya</td>

    <td>15</td>

  </tr>

</table>


17. Write the steps to create a numbered list in HTML.

Ans: The steps to create an ordered list in HTML:

Step 1: Define the Ordered List

Use the `<ol>` tag to define the ordered list.

Step 2: Define List Items

Use the `<li>` tag to define each list item.

Example

<ol>

  <li>Item 1</li>

  <li>Item 2</li>

  <li>Item 3</li>

</ol>

Output

The output will be a numbered list:

1. Item 1

2. Item 2

3. Item 3


18. Write the steps to insert an image in an HTML.

Ans: The steps to insert an image in HTML:

Step 1: Use the `<img>` Tag

Use the `<img>` tag to insert an image.

Step 2: Specify the Image Source

Use the `src` attribute to specify the URL or path to the image.

Step 3: Add Alternative Text

Use the `alt` attribute to add alternative text for accessibility and SEO.

Example:

<img src="image.jpg" alt="Description of the image">

-----or---

<img src="image.jpg" alt="Description of the image" width="300" height="200" title="Image Title">

 

 

TEXTUAL QUESTIONS AND ANSWERS

EXERCISE

Part – I: INTRODUCTION

 

I. FILL IN THE BLANKS:

1. ___ documents are made up of text content and special codes.

Ans. HTML.

2. ___ are used to write notes about an HTML document.

Ans. HTML editor.

3. HTML document is saved with an extension_____.

Ans. .html / .htm.

4. ___ are used to view the HTML documents.

Ans. Web browsers.

5. The _____ element includes both on and off tags.

Ans. Container.

6. The ___ element splits the line and displays the text on a new line.

Ans. BR.


II. MULTIPLE CHOICE QUESTIONS:

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

(1) Using ## and #

(2) Using <!– and –>

(3) Using </– and -/->

(4) Using <!– and -!>

Ans. (2) Using <!– and –>

 

2. The ____ tag draws a horizontal line across the web page.

(1) <br>

(2) <hr>

(3) <line>

Ans. (2) <hr>

 

3. _____ provides a set of style rules for defining the layout of the HTML documents.

(1) CSS          (2) WSS         (3) TSS

Ans. (1) CSS

 

4. A property and its value are collectively known as_____.

(1) Selector

(2) Attribute

(3) Declaration

Ans. (3) Declaration.

 

5. Which tag indicates the beginning and end of the HTML documents?

(1) <HEAD>

(2) <BODY>

(3) <HTML>

Ans. (3) <HTML>

 

6. Which of the following is used to define the style for a single HTML page?

(1) Inline

(2) Internal CSS

(3) External CSS

Ans. (1) Inline CSS


III. APPLICATION BASED QUESTIONS:

1. Yashvi was styling an HTML document using CSS. She wants to add styles directly to an HTML tag using the style attribute with the tag. How can she do this?

Ans. Yashvi can add styles directly to an HTML tag using the ‘style’ attribute within the opening tag of the HTML element. Here’s an example of how she can do it:

<p style=”color: blue; font-size: 16px;”>This is a styled paragraph.</p>

 

2. Rohan wants to divide his web pages into different sections so that content is easily readable. Which tag can he use for this? Which attributes can he use to define some extra properties of this tag?

Ans. The <div> tag is known as the Division tag. The <div> tag is used in HTML to make Divisions of content in the web page like ( text, images, header, footer, navigation bar, etc)

 

3. Kirti wants to set the image of a park as the background of her web page but she is unable to do it. Which tag should she use to do so? Give the syntax.

Ans. Kirti should use BODY tag along with its BACKGROUND attribute to set the image of a park as the background of her web page.

The syntax is as follows:

<BODY BACKGROUND = BLUE>

 

IV. ANSWER THE FOLLOWING:

1. What is a Markup language?

Ans. A  computer language that consists of easily understood keywords, names, or tags that help format the overall view of a page and the data it contains.

Some examples of markup languages are BBC, HTML, SGML, and XML.

 

2. Write some features of HTML.

Ans. Some features of HTML are:

     I.        It is easy to learn and easy to use and modified..

    II.        Images, videos, and audio can be added to a web page.

  III.        Hypertext can be added to the text. It is a markup language..

  IV.        It provides a flexible way to design web pages along with the text.

   V.        It facilitates programmers to add a link on the web pages, so it enhances the interest of browsing the user.

  VI.        HTML is not a case-sensitive language, which means we can use tags either in lower-case or upper-case.

VII.        It can be displayed on any platform like Windows, Linux, Macintosh, etc.

 

3. Explain the terms tags and attributes with the help of an example.

Ans. Attribute: A special keyword used inside an HTML tag to specify additional information about the tag and customize it.

Tags: HTML command that defines the manner in which the content should be formatted and displayed in the browser.

 

4. How are comments useful?

Ans. Comments are textual content that appears in our HTML code but are not rendered by user’s browser.

Comments are given between <! – – and – ->. Browsers ignore the text between comment character sequences.

 

5. What are Cascading Style Sheets? Name the different methods available for applying Style rules in an HTML document.

Ans. CSS or cascading style sheet is a code for setting style rules for the appearance of web pages. CSS handles the cosmetic side of the web.

CSS is used to control the style of a web document in a simple and easy way. It provides an additional feature to HTML. It is generally used with HTML to change the style of web pages and user interfaces.

There are three methods used for applying Style rules in an HTML document.

● Inline CSS – Inline CSS is used to apply a unique style to a single HTML element.

● Internal CSS – An internal CSS is used to define a style for a single HTML page

● External CSS – An external style sheet is used to define the style for many HTML pages.

 

6. Differentiate between Internal CSS and External CSS.

Ans: 

-------------------------------------------------------------------------------------------------------------------------

ALSO READ:

SEBA Class 10 Computer Science Solutions


IMPORTANT LINKS

HTML COLOR CODEGet HTML color codes, Hex color codes, RGB and HSL values with our color picker, color chart and HTML color names.