Class 10 Computer Science Chapter 1 Part-I: HTML5 AND CSS3: Welcome to our website! We are happy to provide you with Class 10th Notes for your academic journey. Class IX is an important year for learners as they prepare themselves for the upcoming board exams, which will determine their academic success.
Today, in this article I will discuss your Class 10th “ HTML5 AND CSS3” Long and Short Questions| We provide solutions for almost all long and short questions.
Our goal is to meet your needs. We provide the Notes here for free. We wish you all the best for your upcoming exams. If you have any doubts, please contact us.
Computer Science Chapter 1 Part-I: HTML5 AND CSS3
TEXTUAL QUESTIONS AND ANSWERS
1. FILL IN THE BLANKS:
EXERCISE
i) ________________ 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?
(i) Using ## and # (ii) Using <!– and –>
(iii) Using </– and -/-> (iv) Using <!– and -!>
Ans. (ii) Using <!– and –>
2. The ___________ tag draws a horizontal line across the web page.
(i) <br> (ii) <hr>
(iii) <line>
Ans. (ii) <hr>
3. _______________ provides a set of style rules for defining the layout of the HTML documents.
(i) CSS (ii) WSS
(iii) TSS
Ans. (i) CSS
4. A property and its value are collectively known as ______________.
(i) Selector (ii)Attribute
(iii)Declaration
Ans. (iii) Declaration
5. Which tag indicates the beginning and end of the HTML documents?
(i) <HEAD> (ii) <BODY>
(iii) <HTML>
Ans. (iii) <HTML>
6. Which of the following is used to define the style for a single HTML page?
(i) Inline CSS (ii) Internal CSS
(iii) External CSS
Ans. (i) Inline CSS
III. APPLICATION BASED QUESTIONS:
1. Yashvi was styling an HTML document using CSS. She wants to add style directly to an HTML tag using the style attribute with the tag. How can she de this?
Ans. She can use the Inline CSS in her HTML document. The syntax for the same as follows:
<TAGNAME STYLE=” PROPERTY: VALUE”>
Example:
<BODY STYLE=”BACKGROUND-COLOR: CYAN”>
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?
Ans. Rohan can use <HR> tag to divide his web page into different sections so that the content is easily readable. It is an empty tag which means the tag has no closing tag.
The attributes, Rohan can use with <HR> tag are as follows with their meanings: SIZE -to specify the thickness of the line. WIDTH – to specify the width of the line. COLOR -to specify the color of the line.
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 can set the image of the park as the background of her web page, she has to write the BACKGROUND attribute in BODY tag.
The syntax is as follows:
<BODY BACKGROUND = BLUE>
ANSWER THE FOLLOWING:
1. What is a markup language?
Ans. Markup language is 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 a markup language are HTML, XML etc.
2. Write some feature of HTML.
Ans. Some features of HTML are:
1. It is a very easy and simple language. It can be easily understood and modified.
2. It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
3. It is a markup language, so it provides a flexible way to design web pages along with the text.
4. 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.
5. HTML is not a case-sensitive language, which means we can use tags either in lower-case or upper-case.
6. It is platform-independent because it can be displayed on any platform like Windows, Linux, and Macintosh, etc.
3. Explain the terms tags and attributes with the help of an example.
Ans. Tags: HTML tags define how web browser will format and display the content With the help of tags, a web browser can distinguish between an HTML content and a simple content.
Attribute: HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML
element.
4. How are comments useful?
Ans. Comments are textual content which appear 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. Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable.
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.
1. Inline CSS – An inline CSS is used to apply a unique style to a single HTML element.
2. Internal CSS- An internal CSS is used to define a style for a single HTML page.
3. 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.
• Internal CSS – This can be used when a single HTML document must be styled uniquely. The CSS rule set should be within the HTML file in the head section i.e the CSS is embedded within the HTML file.
• External CSS – External CSS contains separate CSS file which contains only style property with the help of tag attributes (For example class, id, heading, etc). CSS property written in a separate file with .css extension and should be linked to the HTML document using link tag.
ADDITIONAL QUESTIONS AND ANSWERS
1. What is web programming?
Ans. Web programming is the practice of writing applications that run on a web server and can be used by many different people. Web programming allows you to turn a simple, static HTML page into a dynamic masterpiece.
In other words, Web programming, also known as web development, is the creation of dynamic web applications.
Examples of web applications are social networking sites like Facebook or e-commerce sites like Amazon.
2. What is HTML used for?
Ans. HTML (HyperText Markup Language) is the code that is used to structure a web page and its content.
3. What is the difference between HTML and CSS?
Ans. HTML is a markup language used to create static web pages and web applications. CSS is a style sheet language responsible for the presentation of documents written in a markup language.
4. Define CSS.
Ans. Cascading Style Sheet (CSS) is used to set the style in web pages that contain HTML elements. It sets the background color, font-size, font-family, color etc. property of elements on a web page.
5. What is the difference between HTML and JavaScript?
Ans. JavaScript is an advanced programming language that makes web pages more interactive and dynamic. HTML is a standard markup language that provides the primary structure of a website.
6. Who developed HTML?
Ans. Tim Berners-Lee developed HTML.
7. What is HTML editor? What are its types?
Ans. An HTML editor is a program for editing HTML, the markup of a web page. In other words, HTML editor is a specialized piece of software that assists in the creation of HTML code.
There are two types of editors one can use.
• Text editor – We can create HTML documents using text editors like Notepad or WordPad. The user should have the proper knowledge of HTML commands to develop a web page.
• WYSIWYG (What you see is what you get) editor – This editor allows the developer to see what the end result would look after the document is created. Adobe Dreamweaver, Amaya are some of the examples of such editors.
8. What are tags in HTML?
Ans. Tags are one of the most important parts in an HTML Document. HTML uses som predefined tags which tells the browser about content display property, that is how display a particular given content.
9. What are the different types of tags?
Ans. There are generally two types of tags in HTML:
Container Tags: These tags come in pairs. That is, they have both opening (< >) an closing (</>) tags. Example: <HTML>…</HTML>, <BODY>….. </BODY> etc.
Empty Tags: These tags do not require to be closed. Example: <BR>, <HR> etc.
10. What is attribute of a tag?
Ans. Attributes define additional characteristics or properties of the element such as wide and height of an image. In other words, HTML attribute is a piece of markup languag used to adjust the behavior or display of an HTML element.
For example, attributes can be used to change the color, size, or functionality of HTML elements.
11. What is HTML element?
Ans. An HTML element is defined by a starting tag. If the element contains other content it ends with a closing tag. For example, <p> is starting tag of a paragraph and </p> closing tag of the same paragraph but <p>This is paragraph</p> is a paragraph elements.
12. What is HTML5?
Ans. HTML5 is the improved HTML version released in 2014 by the World Wide Wel consortium.
13. What is the use of <TITLE> tag in HTML?
Ans. The <title> HTML element defines the document’s title that is shown in a browser title bar or a page’s tab.
14. What are the rules for writing HTML codes?
Ans. The following rules must be followed while writing an HTML code:
• Container tags should always be closed properly.
• Tag name should not contain spaces.
• There should not be any space between < and > in a tag.
• Tags must be nested correctly.
15. What is web browser?
Ans. On the Web, when we navigate through pages of information, this is commonly know as web browsing or web surfing.
Examples of web browsers “Internet Explorer, Mozilla Firefox, Netscape Navigator and Safari.