Get answers, questions, notes, textbook solutions, extras, pdf, mcqs, for Computer Chapter 2 HTML and CSS3 (Part I, Part II, Part III) of class 10 (HSLC/Madhyamik) for students studying under the Board of Secondary Education, Assam (SEBA). These notes/answers, however, should only be used for references and modifications/changes can be made wherever possible.
Summary
Think of HTML as the skeleton of the internet. It’s not just some nerdy code that only techies understand; it’s the language that brings websites to life, making them more than just a digital blob of text. When you scroll through your favourite blog or click on a YouTube video, you’re interacting with a carefully designed structure, like rooms in a house. And guess what? HTML laid the foundation for it.
HTML lets you play the role of an architect, choosing where to place text, images, and other types of media. But it doesn’t stop there. One of the coolest things about HTML is the ability to create hyperlinks. Imagine you’re writing a term paper, and you could just tap a word to immediately dive into another source or even a whole other topic. That’s what links do—they’re like magical doorways that transport you from one piece of content to another.
Within a single webpage, you can set up ‘internal’ links that help your visitors effortlessly jump to the exact info they’re after, like a table of contents in a book. ‘External’ links are like a friendly neighbour pointing you to the nearest grocery store; they guide you to different websites altogether. These links are the threads that weave the immense, complex tapestry of the internet.
And let’s not forget, HTML isn’t just about reading—it’s interactive! Want to add a hilarious cat video for a good laugh? HTML lets you embed videos or even audio clips. It’s also your go-to when you’re looking to gather some info from visitors, whether that’s through a simple contact form or a multiple-choice survey.
You can also get creative with HTML by using attributes. Think of these as the spices in a recipe; they give an extra kick that makes a dish—or in this case, a webpage—truly unforgettable. Whether you want an image to fade in, a button to light up, or a form to behave a certain way, attributes are your best friends.
Video tutorial
Part I
Exercise/textual questions and answers
I. Fill in the blanks
1. __________ documents are made up of text content and special codes.
Answer: HTML
2. __________ are used to write notes about an HTML document.
Answer: Comments
3. HTML document is saved with an extension _________.
Answer: .html or .htm
4. __________ are used to view the HTML documents.
Answer: Web browsers
5. The _________ element includes both on and off tags.
Answer: Container
6. The _________ element splits the line and displays the text on a new line.
Answer: <BR>
II. Multiple choice questions
1. Which is the correct way to comment out something in HTML? H
Answer: ii. Using <!– and →
2. The ________ tag draws a horizontal line across the web page.
Answer: ii. <hr>
3. _______ provides a set of style rules for defining the layout of the HTML documents.
Answer: i. CSS
4. A property and its value are collectively known as _______.
Answer: iii. Declaration
5. Which tag indicates the beginning and end of the HTML documents?
Answer: iii. <HTML>
6. Which of the following is used to define the style for a single HTML page?
Answer: ii. Internal 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?
Answer: Yashvi can add styles directly to an HTML tag using the style attribute with the syntax: <tagname style=”property:value;”>
For example: <h1 style=”color:blue;”>Heading</h1>
2. Rohan wants to divide his web page into different sections so that the content is easily readable. Which tag can he use for this? Which attributes can he use to define some extra properties of this tag?
Answer: Rohan can use the <hr> tag to divide sections on his web page. He can use attributes like width, size, align, etc. to define extra properties. For example: <hr width=”50%” align=”center”>
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.
Answer: Kirti should use the background attribute of the <body> tag to set an image as the background of her web page. The syntax is: <body background=”image.jpg”>
So she can use: <body background=”park.jpg”>
IV. Answer the following
1. What is a markup language?
Answer: A markup language is a computer language that uses tags to define elements within a document. It allows text to be enriched with additional information like structure, presentation, etc. HTML is an example of a markup language.
2. Write some features of HTML.
Answer: Some features of HTML are:
i. It is a very easy and simple language. It can be easily understood and modified.
ii. It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
iii. It is a markup language, so it provides a flexible way to design web pages along with the text.
iv. It facilitates programmers to add a link on the web pages (by html anchor tag), so it enhances the interest of browsing of the user.
v. It is platform-independent because it can be displayed on any platform like Windows, Linux, and Macintosh, etc.
vi. It facilitates the programmer to add Graphics, Videos, and Sound to the web pages which makes it more attractive and interactive.
vii. HTML is a case-insensitive language, which means we can use tags either in lower-case or upper-case.
3. Explain the terms tags and attributes with the help of an example.
Answer: An HTML tag surrounds the content and apply meaning to it. It is written between < and > brackets. Example: <h1>
An attribute in HTML provides extra information about the element, and it is applied within the start tag. An HTML attribute contains two fields: name & value. Example: <a href=”url”>
4. How are comments useful?
Answer: Comments in HTML code are useful because they allow adding explanatory notes for code, allow commenting out sections of code temporarily, and make the code easier to understand.
5. What are Cascading Style Sheets? Name the different methods available for applying Style rules in an HTML document.
Answer: CSS, short for Cascading Style Sheets, is a code for setting style rules for the web pages. CSS handles the cosmetic side of the web.
The different methods of applying CSS are:
Inline CSS – Style rules applied directly to a single element
Internal CSS – Style rules defined inside the <head> section of the HTML page
External CSS – Style rules defined in a separate .css file that is linked to HTML document
6. Differentiate between Internal CSS and External CSS.
Answer: An internal CSS is used to define a style for a single HTML page. On the other hand, an external style sheet is used to define the style for many HTML pages.
Part II
Exercise/textual questions and answers
1. By default, the unordered lists items are marked with_____.
Answer: Bullets
2. _____ attribute of list lets you reverse the order of the item list.
Answer: The reversed
3. A list inside another list is called as a _____ list.
Answer: Nested
4. A collection of related elements is called as_____.
Answer: Description list
5. _____ property of table defines the space between the content of the table and the border.
Answer: Padding
6. The <img> tag is an _____ tag, that means it has no closing tag.
Answer: Empty
7. _____ is an attribute of the <img> tag which specifies the location or URL of the image to be displayed.
Answer: src
8. _____ attribute is used to give border to an image.
Answer: Border-radius
II. Multiple choice questions
1. Which tag is used for List items?
Answer: b. <LI>
2. Which element contains definition?
Answer: b. <DD>
3. Which of the following can’t be the value of list-style-type?
Answer: c. Ellipse
4. Which attribute is only used with <ol>?
Answer: d. start
5. With the help of which tag, is a row defined in HTML?
Answer: b. <tr>
6. By using which of the following options, the border of table can be collapsed?
Answer: a. border-collapse: collapse
7. Web browsers display images in the following format
Answer: d. All of these
8. The correct HTML code for inserting an image is
Answer: c. <img src= “image.gif”>
9. src attribute used with <img> tag stands for
Answer: b. source
10. alt attribute allows
Answer: d. addition of alternative text about an image
III. Application based questions
a. Ruchika was making an ordered list and she noticed that the items of the list by default started with numbers. She wants to use Roman numerals for numbering. How can she do this?
Answer: a) Ruchika can use the type attribute of the <ol> tag to specify Roman numerals for an ordered list. The syntax is: <ol type=”i”>
So her code would be: <ol type=”i”> <li>Item 1</li> <li>Item 2</li> </ol>
b. Rohan has created a table and he wants that the table border should be collapsed into a single border. Which property should he use?
Answer: Rohan should use the border-collapse property in CSS to collapse the borders of his table into a single border. The syntax is:
table {
border-collapse: collapse;
}
c. Ashmita has added few images on her web page but she wants to keep some provisions for the visually impaired people or users using text-based browsers so that they get the description for the images. Which attribute should she use to accomplish the task?
Answer: Ashmita should use the alt attribute for images to provide a text description. The alt attribute specifies an alternate text for an image, which can be read by screen readers for visually impaired users.
For example:
<img src=”image.jpg” alt=”A beautiful landscape”>
The alt text will be displayed if the image fails to load on the page. So it’s important for accessibility.
IV. Answer the following
a. Differentiate between the <OL> and <UL> tag.
Answer: An ordered list is enclosed within the and tag. Each item in the list is given an tag that specifies lite item. The tag is used to represent individual list items within the tag.
On the other hand, an unordered list is used when the items in the list are not required to be in a specific order. It is also called bulleted list. An unordered list is enclosed within the tag. Just like in ordered list, tag is used to mark the individual list items.
b. Write the syntax for using list-style-type property.
Answer: list-style-type: value
c. Define Padding property.
Answer: The padding property in CSS defines the space between the content and the border of an element. It allows specifying the padding space on all four sides of an element using values in length units like px, cm etc.
d. What is a description list? Define the different tags used to create a description.
Answer: A definition list, also called a description list consists of a term followed by its definition. In simple terms, this is a list of items, with a description of each item. It starts and ends with and tag.
The different tags used to create a description are:
The <DT> tag is used in defining the terms.
The <DD> tag is used in describing each term.
e. What is the use of type attribute with an unordered list?
Answer: The type attribute in unordered list (<UL>) is used to change the style of bullet points. The available values are: disc (default), circle, square
For example: <UL type=”square”> <LI>Item 1</LI> <LI>Item 2</LI> </UL>
This will show square bullets instead of the default disc style.
f. State the use of any two properties that you use to enhance the appearance of a table.
Answer: Two properties that can enhance the appearance of an HTML table are:
- border: To set the width, style and colour of table borders. Example: border: 1px solid blue;
- padding: To set spacing between cell content and borders. Example: padding: 10px;
g. How are images added in an HTML document?
Answer: Images are added in an HTML document using the <img> tag. The key attributes are:
- src – specifies path of the image file
- alt – provides alternate text for the image
- width – sets width of image
- height – sets height of image
Part III
Exercise/textual questions and answers
I. Fill in the blanks
1. The web pages of a website are linked to each other using_____.
Answer: Hyperlinks
2. The attribute _____ is used to create a hyperlink between two or more HTML codes.
Answer: href
3. When you move the mouse pointer over a link, the mouse pointer changes its shape from an arrow to a_____.
Answer: pointing hand
4. The ______ attribute of the <audio> tag indicates that you can replay the audio file once it is finished.
Answer: Loop
5. The small rectangular areas created in the main browser window are known as______.
Answer: frames
6. The _____ attribute of the frame tag tells the browser which HTML page to load into that frame.
Answer: src
7. _____ attribute of the frame tag attaches the default URL.
Answer: The name
8. ______ allow multiple HTML documents to be presented as independent windows within one browser window.
Answer: Frames
9. The _____ tag collects the information from the user.
Answer: form
II. Multiple choice questions
1. A _____ is a word, a group of words, or an image that can be used to jump to another document on the same website or another website.
Answer: i. Hyperlink
2. The _____ attribute of the <a> tag is used to set the URL of the target resource.
Answer: ii. href
3. Which of the following can be embedded in a web page?
Answer: iii. Both (i) and (ii)
4. The _____ attribute of the <video> tag plays the video file automatically on loading a web page.
Answer: ii. Autoplay
5. _____ tag is used to create textbox, radio button and checkbox on the web page.
Answer: ii. <INPUT>
III. Application based questions
1. Rohan wants to divide a web page into four sections. Which tag should he use to accomplish this?
Answer: To divide a web page into multiple sections, Rohan can use the <iframe> tag in HTML. He would need 4 iframe tags to split the page into 4 sections.
For example:
- <iframe src=”section1.html”></iframe> <iframe src=”section2.html”></iframe>
<iframe src=”section3.html”></iframe> <iframe src=”section4.html”></iframe>
Each iframe will load the specified HTML page into that section.
2. Rahim is creating a website in which he wants to use different images as links to the web pages. He is also interested in adding some video clips in his website. Can you suggest him the required tags to include the said elements in his website.
Answer: o use images as links, Rahim can use the <a> anchor tag and nest an <img> tag inside it. For example: <a href=”page1.html”><img src=”image1.jpg”></a>
This will make the image clickable to page1.html. For videos, he can use the <video> tag and specify the video file in the src attribute. For example: <video src=”video1.mp4″ controls></video>
This will embed the video file and display playback controls.
3. Ritika was writing an article using HTML. The article contains some external links to other website contains additional information. How can she link these together so that the user can visit the destination of the external links by clicking on them?
Answer: To link external websites in her article, Ritika can use the anchor <a> tag as follows: <a href=”http://externalsite.com/page1″>More information here</a>
The href will contain the full URL of the external site. When user clicks on the linked text, they will be taken to that page.
4. Priyanka wants to create a form but she has forgotten the tag used to create the form. Can you help her with the solution?
Answer: The tag used to create an HTML form is <form>. So Priyanka can use: <form> // form elements like input, textarea etc </form> to create the form structure.
IV. Answer the following
1. Why do you include hyperlinks in your web page? Give any two reasons.
Answer: Hyperlinks are included in web pages for the following reasons:
- To navigate between pages within the same website. This allows easy movement across the site.
- To link to external pages on other websites. This allows providing additional information to users.
2. Distinguish between the internal and external linking.
Answer: When one part of a web page is linked to another section on the same web page, it is called internal linking. In this case, the hyperlink and the linked section appear on the same web page.
On the other hand, when one page is linked to another web page of the same website or another website, it is called external linking.
3. What are frames? How are they useful?
Answer: Frames allow you to divide the web page into several independent windows allowing multiple views at one time. These also help in making one part static while other parts change as per other command.
Frames are useful for:
- Keeping navigation or menus constant while changing the main content area.
- Displaying multiple web pages together for comparison or related information.
- Showing advertisements or additional content alongside the main content.
4. What are two types of text input in HTML web forms?
Answer: Two common types of text input in HTML forms are:
- Single line text input like <input type=”text”>. Used for items like name, search etc.
- Multi-line text input like <textarea>. Used when input can be longer than one line.
5. Which input control is most useful for questions requiring a simple yes or no answer?
Answer: Checkboxes are the most useful input control for yes/no or true/false type questions. The user can check or uncheck the box to select an option.
6. What is the use of password control in HTML forms?
Answer: The password input control is used when entering sensitive information like passwords that should be masked and not visible openly.
7. What is the use of <INPUT> tag?
Answer: The <input> tag is used to create various form controls like textboxes, checkboxes, radio buttons, submit/reset buttons etc.
8. What are the uses of Submit and Reset buttons?
Answer: Submit and Reset buttons have the following uses in HTML forms:
- Submit button is used to send the form data to the server for processing.
- Reset button is used to clear all the entered values in the form controls.
Extra/additional questions and answers
1. What does HTML stand for?
Answer: HTML stands for Hypertext Markup Language.
2. Describe the role of CSS in web pages.
Answer: CSS, short for Cascading Style Sheets, is a code for setting style rules for the appearance of web pages. CSS handles the cosmetic side of the web.
3. List two broad divisions of web development.
Answer: The two broad divisions of web development are front-end development (also called client-side development) and back-end development (also called server-side development).
4. Why is HTML considered a markup language rather than a programming language?
Answer: HTML is considered a markup language rather than a programming language because it is a set of markup tags that tells the browser how to display the Web page content.
5. Explain the significance of the Hyper in Hypertext Markup Language.
Answer: Hyper signifies that the user can view World Wide Web pages by moving anywhere in any direction.
6. What is the meaning of Markup in HTML?
Answer: Markup is what HTML tags do to the text inside them; they mark it as a specific type of text.
7. State the purpose of using HTML tags.
Answer: HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.
8. Describe the basic structure of an HTML document.
Answer: The basic structure of an HTML document includes the DOCTYPE declaration, HTML root element, HEAD, and BODY sections, with essential tags like TITLE enclosed within.
9. What is the purpose of the TITLE tag in an HTML document?
Answer: The TITLE tag is used to give the title of the web page, which is displayed in the title bar of the browser window.
10. Explain the use of attributes in HTML tags.
Answer: An attribute in HTML provides extra information about the element, and it is applied within the start tag. An HTML attribute contains two fields: name & value.
11. Differentiate between Container tags and Empty tags in HTML.
Answer:
- Container tags: These tags come in pairs, i.e., they have both opening and closing tags. Example: <HTML> …. </HTML>, <BODY>….</BODY>.
- Empty tags: These type of tags doesn’t have closing tags. Example: <BR>, <HR>.
12. How are comments used in HTML?
Answer: Comments are used to write notes about an HTML document, which are ignored by browsers during rendering.
13. Define and give an example of how to use an HTML attribute.
Answer: HTML attributes are special words which provide additional information about the elements. For example, <element attribute_name=”value”>content</element>.
14. What is the significance of the head section in an HTML document?
Answer: The HEAD section contains the information about the HTML document, like the Title of the page, version of HTML, etc.
15. What is the purpose of the body tag in an HTML document?
Answer: The BODY tag contains everything you want to display on the Web Page.
16. What are the rules for writing HTML codes?
Answer: Some rules for writing HTML codes include proper closure of container tags, no spaces within tags, correct nesting, and differentiation between a simple text and HTML text by using tags enclosed within <> brackets.
17. How would you create your first web page displaying “Welcome to the World of HTML!”?
Answer: To create a web page that displays “Welcome to the World of HTML!”, one must write HTML code in an HTML editor, save the file with an .html extension, and open it in a web browser.
18. Define the function of the <h1> to <h6> tags in HTML.
Answer: Headings help in defining the hierarchy and the structure of the web page content. HTML offers six levels of heading tags, <h1> through <h6>; the lower the heading level number, the greater its importance.
19. Describe the function of the <p> tag in HTML.
Answer: The paragraph tags are used to define a block of text as a paragraph. In HTML, <P> tag represents a paragraph.
20. Explain the use of the <img> tag in HTML.
Answer: The <img> tag is used to embed images into an HTML page. It is an empty tag, which means it has no closing tag and attributes like src and alt provide the location and description of the image, respectively.
Get notes of other boards, classes, and subjects
It’s very useful to me, I am going to appear in hslc examination and this website had a tremendous influence on me. I cover all of my notes from this website social, computer everything. I would love to thanks the maker of the website. Thank you.