Hello Viewers Today’s We are going to Share With You, The Complete Syllabus of SEBA Class 10 Computer Science Chapter 2 Html5 And Css3 Solutions in English in This Page. Are you a Student of (Secondary Education Board of Assam). SEBA Class 10 Computer Science Chapter 2 Html5 And Css3 Notes. Which you Can Download PDF SEBA Class 10 Computer Science Chapter 2 Html5 And Css3 Question Answer for free using direct Download Link Given Below in This Post.
SEBA Class 10 Computer Science Chapter 2 Html5 And Css3
We have Shared in This Post, SEBA Class 10 Computer Science Chapter 2 Html5 And Css3 Textbook PDF Download for Free with you. SEBA Class 10 Computer Science Chapter 2 Html5 And Css3 Solutions PDF. I Hope, you Liked The information About The SEBA Class 10 Computer Science Chapter 2 Html5 And Css3 Book PDF. If you liked Class 10 Computer Science Notes Then Please Do Share this Post With your Friends as Well.
Html5 And Css3
PART – I: INTRODUCTION |
TEXTUAL QUESTIONS AND ANSWERS |
EXERCISE
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?
(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 styles directly to an HTML tag using the style attribute with the tag. How can she do this?
Ans. She can use the Inline CSS in her HTML document. The syntax for the same is 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>
IV. 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:
- It is a very easy and simple language. It can be easily understood and modified.
- It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
- It is a markup language, so it provides a flexible way to design web pages along with the text.
- 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.
- HTML is not a case-sensitive language, which means we can use tags either in lower-case or upper-case.
- 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.
- Inline CSS — An 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.
- 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.
V. LAB ACTIVITY:
1. Create a web page that serves as an invitation card to your birthday party. Use all the HTML tags along with CSS properties you have learnt to make it attractive and lively.
Ans. Coding:
Output:
2. Create a web page that serves as a guide for the mathematical formulas using HTML target along with CSS properties.
Ans. Coding:
Output:
S.L No. | CONTENTS |
Chapter 1 | Introduction To Computer Network |
Chapter 2 | Html5 And Css3 |
Chapter 3 | Database Part – II Mysql |
Chapter 4 | Introduction To Loops |
Chapter 5 | Nested Loops In C |
Chapter 6 | Arrays In C |
Chapter 7 | Functions In C |
Chapter 8 | Pointers In C |
Chapter 9 | Structure In C |
Chapter 10 | An Introduction To Object Oriented Programming |
Chapter 11 | Case Studies |
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 some predefined tags which tells the browser about content display property, that is how to 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 (< >) and 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 width and height of an image. In other words, HTML attribute is a piece of markup language 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> is closing tag of the same paragraph but <p>This is paragraph</p> is a paragraph element.
12. What is HTML5?
Ans. HTML5 is the improved HTML version released in 2014 by the World Wide Web 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’s 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 known as web browsing or web surfing.
Examples of web browsers “Internet Explorer, Mozilla Firefox, Netscape Navigator, and Safari.
16. What is the use of the following tags?
(a) BODY tag
<body> tag is used to define the body of html document. It contains image, tables, lists, … etc.
(b) HEADING tag
<Hn> tag is used to define the heading of html document.
(c) COMMENT tag
It is used to set the comment in html document. It is not visible on the browser.
(d) PARAGRAPH tag
<p> tag is used to define paragraph content in html document.
(e) LINE BREAK tag
<br> is used to add line breaks.
f. HORIZONTAL RULE tag
<hr> tag is used to define horizontal lines spread across the width of the web page.
(g) EMPHASIS tag
<em> tag is used to renders as emphasized text.
(h) BOLD tag
<b> tag is used to specify bold content in html document.
(i) ITALIC tag
<i> tag is used to write the content in italic format.
(j) UNDERLINE tag
<u> tag is used to set the content underline.
(k) STRONG tag
<strong> tag is used to display the content in bold font and informs the browser about its logical significance.
(l) MARKED tag
<mark> tag is used to highlight text.
(m) STRIKE tag
<strike> tag is used to strikethrough the text.
17. Explain the structure of an HTML document.
Ans. An HTML Document is mainly divided into two parts:
- HEAD: This contains the information about the HTML document. For Example, Title of the page, version of HTML etc.
- BODY: This contains everything you want to display on the Web Page.
Explanation:
- <!DOCTYPE html>: This tag is used to tells the HTML version. This currently tells that the version is HTML 5.
- <html>: This is called HTML root element and used to wrap all the code.
- <head>: Head tag contains metadata, title, page CSS etc.
- <body>: Body tag is used to enclose all the data which a web page has from texts to links. All the content that you see rendered in the browser is contained within this element.
18. What are heading tags? What are the different levels of heading tags?
Ans. Header tags, also known as heading tags, are used to separate headings and subheadings on a webpage. In other words, HTML heading tag is used to define the headings of a page.
There are six levels of headings defined by HTML. These 6 heading elements are <H1>, <H2>, <H3>, <H4>, <H5>, and <H6>; with <H1> being the highest level and <H6> the least.
19. What is the importance of heading tags?
Ans.
- HTML headings provide valuable information by highlighting important topics and the structure of the document, so optimize them carefully to improve user engagement.
- Don’t use headings to make your text look BIG or bold. Use them only for highlighting the heading of your document and to show the document structure.
- Since search engines, such as Google, use headings to index the structure and content of the web pages so use them very wisely in your webpage.
- Use the <h1> headings as main headings of your web page, followed by the <h2> headings, then the less important <h3> headings, and so on.
20. What is <hr> tag? Write its attribute with their meanings.
Ans. The <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. The <hr> tag is an empty tag, and it does not require an end tag.
Attributes of Horizontal Rule (<HR> Tag)
Attribute | Function |
SIZE | Specify the thickness of the line. |
WIDTH | Specify the width of the line in percentage. |
COLOR | Specify the color of the line. |
ALIGN | Controls the alignment of the line on the web page. The different types of alignments are:Left: To align the text to the left.Right: To align the text to the right.Center: To align the text to the center. |
NOSHADE | Specifies that a <HR> element should render in one solid color andnoshaded. |
21. What is the difference between <p> and <break> tag?
Ans. The difference between <p> and <break> tag are:
22. What is the difference between logical and physical tags?
Ans. The difference between logical and physical tags are:
23. What is the difference between <sub> tags and <sup> tags?
Ans. The difference between <sub> tags and <sup> tags are:
24. What are the advantages of CSS?
Ans.
- CSS plays an important role, by using CSS you simply got to specify a repeated style for element once & 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. One instruction can control several areas which is advantageous.
- If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag. So less code means faster download times.
- Cascading sheet not only simplifies website development, but also simplifies the maintenance as a change of one line of code affects the whole web site and maintenance time.
- It is less complex therefore the efforts are significantly reduced.
25. What are the different parts of Cascading Style Sheets?
Ans. The Cascading Style Sheets has two parts: selector and declaration.
26. What is selector in CSS?
Ans. Selector indicates the HTML element to be styled. It could be any tag like <h1>, <p> etc.
27. What is declaration in CSS?
Ans. The declaration specifies the formatting to the selector.
28. What is the difference between property and value?
Ans. A Property is a type of attribute of HTML element whereas values are assigned to CSS properties.
29. Write the syntax of CSS.
Ans.
30. What is formatting in HTML?
Ans. The HTML formatting is a process of format the text for a better look and feel. It uses different tags to make text bold, italicized, underline.
31. How many types of heading does an HTML contain?
Ans. The HTML contains six types of headings which are defined with the <h1> to <h6> tags. Each type of heading tag displays different text size from another. So, <h1> is the largest heading tag and <h6> is the smallest one.
32. What is the difference between HTML elements and tags?
Ans. The element is an individual component of the HTML web page or document. It represents semantics or meaning. For example, the title element represents the title of the document.
It is the root of the HTML document which is used to specify that the document is HTML. For example, the Head tag is used to contain all the head element in the HTML file.
33. What are attributes and how do we use them?
Ans. Each tag has additional attributes that change the way the tag behaves or is displayed. Attributes are specified directly after the name of the tag, inside the two angled brackets. They should only ever appear in opening tags or in self-closing tags.
34. What are logical and physical tags in HTML?
Ans. Logical tags are used to tell the meaning of the enclosed text. The example of the logical tag is <strong> </strong> tag. When we enclose the text in the strong tag, it tells the browser that enclosed text is more important than other texts.
Physical tags are used to tell the browser how to display the text enclosed in the physica tag. Some of the examples of physical tags are <b>, <big>, <i>.
35. When are comments used in HTML?
Ans. To understand the code easily, you can add code comments to your HTML document. These are not displayed in the browser, but they help you in leaving notes for yourself and other developers as to what a section of HTML is for.
The start of the comment is denoted by <!- and the end is marked by—>. Anything in the middle will be completely ignored, even if it contains valid HTML.
36. What are the tags used to separate a section of texts?
Ans. There are two tags that can be used to separate the texts:
- <br> tag — Usually <br> tag is used to separate the line of text. It breaks the current line and conveys the flow to the next line.
- <p> tag — This contains the text in the form of a new paragraph.
37. What happens if we open the external CSS file in a browser?
Ans. When you try to open the external CSS file in a browser, the browser cannot open the file, because the file has a different extension. The only way to use an external CSS file is to reference it using <link/> tag within another HTML document.
38. What is a style sheet?
Ans. A style sheet is used to build a consistent, transportable, and well-designed style template. You can add these templates on several different web pages. It describes the look and formatting of a document written in markup language.
39. How many types of CSS can be included in HTML?
Ans. There are three ways to include the CSS with HTML:
- Inline CSS: It is used for styling small contexts. To use inline styles add the style attribute in the relevant tag.
- Internal Style Sheet: It is used when a single document has a unique style. Internal styles sheet needs to put in the head section of an HTML page, by using the <style> tag.
- External Style Sheet: This is used when the style is applied to many pages. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section.
40. Does a <! DOCTYPE HTML> tag is an HTML tag?
Ans. No, the <! DOCTYPE html> declaration is not an HTML tag. <! DOCTYPE HTML> is used to instruct the web browser about the HTML page.
PART – II: LIST, TABLES AND IMAGES |
TEXTUAL QUESTIONS AND ANSWERS |
EXERCISE
I. FILL IN THE BLANKS:
1. By default, the unordered lists items are marked with ______________.
Ans. bullet.
2. _______________ attribute of list lets you reverse the order of the item list.
Ans. REVERSED.
3. A list inside another list is called as a ______________ list.
Ans. nested.
4. A collection of related elements is called as ________________.
Ans. list.
5. ______________ property of table defines the space between the content of the table and the border.
Ans. CELLPADDING.
6. The <img> tag is an _______________ tag, that means it has no closing tag.
Ans. empty.
7. _______________ is an attribute of the <img> tag which specifies the location or URL of the image to be displayed.
Ans. SRC.
8. ______________ attribute is used to give border to an image.
Ans. BORDER.
II. MULTIPLE CHOICE QUESTIONS:
1. Which tag is used for List items?
(a) <OL>
(b) <LI>
(c) <UL>
(d) <DL>
Ans. (b) <LI>
2. Which element contains definition?
(a) <DL>
(b) <DD>
(c) <DT>
(d) <DL>
Ans. (b) <DD>
3. Which of the following can’t be the value of list-style-type?
(a) Square.
(b) Circle.
(c) Ellipse.
(d) Disc.
Ans. (c) Ellipse.
4. Which attribute is only used with <ol>?
(a) Value.
(b) type.
(c) compact.
(d) start.
Ans. (d) start.
5. With the help of which tag, is a row defined in HTML?
(a) <row>
(b) <tr>
(c) <row-table>
(d) <tablerow>
Ans. (b) <tr>
6. By using which of the following options, the border of table can be collapsed?
(a) border-collapse: collapse.
(b) table-border: collapse.
(c) border: collapse.
(d) table-border-collapse: collapse.
Ans. (a) border-collapse: collapse.
7. Web browsers display images in the following format.
(a) XBM.
(b) GIF.
(c) JPEG.
(d) All of these.
Ans. (d) All of these.
8. The correct HTML code for inserting an image is—
(a) <img href = “image.gif”>
(b) <img> image.gif</gif>
(c) <img src = “image.gif”>
(d) <image src = “image.gif”>
Ans. (c) <img src = “image.gif”>
9. src attribute used with <img> tag stands for
(a) screen.
(b) source.
(c) screen resolution count.
(d) structure.
Ans. (b) source.
10. alt attribute allows:
(a) addition of an alternate hyperlink.
(b)addition of a border to image.
(c) use of an alternative image in place of the specified image.
(d) addition of alternative text about an image.
Ans. (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?
Ans. To use Roman numerals for numbering, Ruchika must use the following code – <OL TYPE = I>
(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?
Ans. To make the border to collapsed, Rohan must use the following property: 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?
Ans. To get the description for the images, Ashmita must use the ALT attribute with the image tag. The syntax for the same is given below:
<IMG SRC = name of the image ALT = description of the image>
IV. ANSWER THE FOLLOWING:
(a) Differentiate between the <OL> and <UL> tag.
Ans. <OL> stands for Ordered List which can be either numerical or alphabetical while <UL> stands for Unordered List which can be either disc, square or circle.
(b) Write the syntax for using list-style-type property.
Ans. <UL style = “List-style-type:square”>
<LI> List Item 1</LI>
<LI> List Item 2</LI>
</UL>
(c) Define Padding property.
Ans. Padding property is the space between its content and its border.
The syntax for padding property for all four sides of a <p> element to 20px is as follows:
p{
padding: 20px
}
(d) What is description list? Define the different tags used to create a description.
Ans. 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 <DL> and </DL> 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?
Ans. The HTML <ul> type attribute is used to specifies what kind of bullet used to mark items in the list such as Disc, Circle or Square.
(f) State the use of any two properties that you use to enhance the appearance of a table.
Ans. The following properties are used to enhance the appearance of a table –
- Border – property, which is used to specify the thickness, type and color of the border.
- Border – collapse, is used to apply separate or single border for each cell.
(g) How are images added in an HTML document?
Ans. The images on a web page can be inserted using <IMG> tag, which is an empty tag. The most widely used image formats supported by HTML are GIF, JPEG and PNG.
The syntax to insert an image on the web page is —
<IMG SRC = “image file name”>
V. ACTIVITY:
1. Create a web page to show a list of various colours and their Hex codes (Hexadecimal numerals are widely used by computer system designers and programmers because they provide a human—friendly representation of binary–coded values). Also provide image for colours you mention in your code.
Ans. Code:
<!DOCTYPE html>
<html>
<head>
<title> Colours and their Hex codes</title>
</head>
<body text=white>
<H1> <FONT COLOR = BLUE> MAJOR HEXADECIMAL COLOR CODES</FONT> </H1>
<P> Below are some of the common color names and codes. </P>
<FONT SIZE=5 color=brown>
<TABLE border=2 width=80% align=center>
<TR>
<TH> Color Name </TH>
<TH> Color Code </TH>
<TH> Color Name </TH>
<TH> Color Code </TH>
</TR>
<TR>
<TD bgcolor = #FF0000> RED </TD>
<TD> #FF0000 </TD>
<TD bgcolor = #00FFFF> CYAN </TD>
<TD> #00FFFF</TD>
</TR>
<TR>
<TD bgcolor = #FFFFFF> WHITE </TD>
<TD> #FFFFFF </TD>
<TD bgcolor = #0000FF> BLUE </TD>
<TD> #0000FF </TD>
</TR>
<TR>
<TD bgcolor = #FFFF00> YELLOW </TD>
<TD> #FFFF00 </TD>
<TD bgcolor = #000000> BLACK </TD>
<TD> #0000FF </TD>
</TR>
</TABLE>
</FONT>
</body>
</html>
Output:
2. Create a web page to form a tabular representation of different mobile names with their features.
Ans. Code:
<HTML>
<HEAD>
<TITLE> MOBILE NAMES WITH THEIR FEATURES </TITLE>
</HEAD>
<BODY bgcolor=yellow>
<TABLE WIDTH=80% BORDER = 2 ALIGN = CENTER>
<CAPTION> <FONT SIZE=4 COLOR = BROWN> MOBILES </FONT></ CAPTION>
<FONT SIZE=4>
<TR>
<TH> COMPANY</TH>
<TH> FEATURES </TH>
</TR>
<TR>
<TD> Samsung Galaxy M33 5G </TD>
<TD> Deep Ocean Blue, 6GB, 128GB Storage) | 5nm Processor | 6000mAh Battery | Voice Focus | Upto 12GB RAM with RAM Plus </TD>
</TR>
<TR>
<TD> Vivo Y73 </TD>
<TD> Roman Black, 8GB RAM, 128GB Storage </TD>
</TR>
<TR>
<TD> OPPO F19 </TD>
<TD> Prism Black, 6GB RAM, 128GB Storage) 48 MP Triple Camera | AMOLED FHD+ Display | 5000 mAh Battery </TD>
</TR>
<TR>
<TD> Redmi Note 11</TD>
<TD> Horizon Blue, 4GB RAM, 64GB Storage) | 90Hz FHD+ AMOLED Display | Qualcomm ® Snapdragon™ 680-6nm | Alexa Built-in </TD>
</TR>
</FONT>
</TABLE>
</BODY>
</HTML>
Output:
ADDITIONAL QUESTIONS AND ANSWERS |
1. Explain list elements in HTML.
Ans. Below are the list elements in HTML.
- Ordered List (<ol>) — An Ordered List or <ol> tag is the list that lists the items in an ordered way, i.e. numbered or alphabetically.
- Unordered List (<ul>) — An Unordered List or <ul> tag is the list which will list the items in an unordered way, i.e. in bulleted format or in any other format.
- Definition List (<dl>) — A Definition List or <dl> tag arrange the items in the way in which they are arranged in a dictionary.
2. What is list item tag?
Ans. List item tag is used to define each item of a list. Once we define list items with the <li> tag, the list appears in Web browsers in the bulleted form (by default). It is used inside both ordered and unordered list.
Syntax:
<LI> Content </LI>
3. What are the attributes of ordered list? Write their syntax.
Ans. The following are the attributes of ordered list or <OL> tag
- REVERSED-This attribute is used to specifies that the ordered of the list should be reversed.
Syntax:
<OL reversed>
- TYPE – This attribute is used to specifies the type of list item maker. The value of this attribute is decimal (Default)/lower-roman/upper roman/lower-alpha/upper alpha.
Syntax:
<OL type = 1 / I / i / A /a>
- START – This attribute is used to specifies the start value of the list.
Syntax:
<OL start = number>
4. What are the attributes of unordered list? Write their syntax.
Ans. List-style-type: This attribute is used to specifies the bullet style that will be used as the list item marker. The value of this attribute is None/disc(default)/circle/square.
Syntax:
<UL style = “list-style-type: square |disc| none;”>
5. How do we add an unordered list in HTML?
Ans. To create unordered list in HTML, use the <ul> tag. The unordered list starts with the <ul> tag. The list item starts with the <li> tag and will be marked as disc, square, circle, etc. The default is bullets, which is small black circles.
6. What are the tags associated with description list?
Ans. Description list is a list in which each term contains its description. This tag contains <dt> and <dd> tag.
- <dt>…</dt>: This tag is used to define the name or term
- <dd>…<dd>: this tag is used to describe the term.
7. List the tags that are used to create description list.
Ans. The <DL>, <DT> and <DD> tags are used to create description list.
8. What do you call a list that uses bullet points of some kind?
Ans. Lists made with bullets are called bulleted lists. The HTML element name for a bulleted list is “unordered list”, because the list items are not arranged in numerical order.
9. Why tables are useful in HTML?
Ans.
- Tables help in presenting the information or data in a comprehensive manner.
- Tables can be used for comparative analysis of data.
- Information displayed in tables is easier to read and quicker to evaluate.
10. What is table tag in HTML?
Ans. An HTML structure for creating rows and columns on a Web page. The Table tag defines the overall table and the Table Row (TR) tag is used to build each row. The Table Data (TD) tag defines the actual data.
11. How do one create a row and column table in HTML?
Ans. We can create a table using the <table> element. Inside the <table> element, you can use the <tr> elements to create rows, and to create columns inside a row you can use the <td> elements. You can also define a cell as a header for a group of table cells using the <th> element.
12. What are the basic HTML tags used to display the data in the tabular form?
Ans. The list of HTML tags used to display data in the tabular form are—
Tags | Description |
<TABLE> | The <TABLE> tag is a basic structural tag that encloses the entire table information. This is a container tag. |
<TR> | This is a container tag. This is used to enclose the data of a single row in the table. |
<TD> | Within each row of the table, data is represented in the form of individual cells. The <TD> tag is used represent each cell entry of the table. |
<TH> | This tag is used to define the headings of the table. |
<CAPTION> | This tag defines the title or caption of the table. |
13. How is cell padding different from cell spacing?
Ans. Cell Spacing is the space or gap between two consecutive cells. Whereas, Cell Padding is the space or gap between the text/ content of the cell and the edge/ border of the cell.
14. What is the purpose of using alt attribute in <IMG> tag?
Ans. The alt attribute specifies an alternate text for an image, if the image cannot be displayed.
15. How to insert a picture into the background image of a web page?
Ans. To insert a picture into the background image, you need to place a tag code after the </ head> tag in the following way:
<BODY background = “image.jpg”>
16. How to insert an image in HTML?
Ans. Images can be inserted in an HTML page by using the <img> tags. It is an empty tag that has only attributes and it does not require a closing tag. The <img> tag must be used inside <body>…</body> tag. Following parameters will be required to insert an image using <img> tag
- src attribute – It is used to add the path to the image (URL of the image).
- alt attribute — It is for adding alternate text.
- Width — To add the width of the image.
- Height — To add the height of image.
17. What is the use of caption attribute in creating a table?
Ans. The caption element represents a title or caption for the table it’s declared in. The <caption> tag must be inserted immediately after the <table> tag.
18. What is the use of cellpadding attribute in HTML?
Ans. The HTML <table> cellpadding Attribute is used to specify the space between the cell content and cell wall. The cellpadding attribute is set in terms of pixels.
19. What is the use of cellspacing attribute in HTML?
Ans. The HTML <table> cellspacing Attribute is used to specify the space between the cells. The cellspacing attribute is set in terms of pixels.
20. Write an HTML code to form a table to show the below values in a tabular form with heading as Roll No., Student name, Subject Name, and values as
(a) Ram, Physics.
(b) Shyam, Math.
(c) Murli, Chemistry.
Ans.
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<table>
<tr>
<th> Roll No. </th>
<th> Student Name </th>
<th> Subject Name </th>
</tr>
<tr>
<td> 1 </td>
<td> Ram</td>
<td> Physics </td>
</tr>
<tr>
<td> 2 </td>
<td> Shyam </td>
<td> Math </td>
</tr>
<tr>
<td> 3 </td>
<td> Murli </td>
<td> Chemistry </td>
</tr>
</table>
</body>
</html>
Output:
Roll No. | Student Name | Subject Name |
1 | Ram | Physics |
2 | Shyam | Math |
3 | Murli | Chemistry |
21. What is the purpose of CSS properties in inserting a table in HTML?
Ans. With CSS we can greatly improve the appearance your tables. CSS provides several properties that allow you to control the layout and presentation of the table elements.
22. Name the property that is used to set border of the table.
Ans. To specify table borders in CSS, use the border property.
23. What is the use of border-collapse property?
Ans. The border-collapse specifies whether the browser should control the appearance of the adjacent borders that touch each other or whether each cell should maintain its style.
24. What is <IMG> tag in HTML?
Ans. The <img> tag is used to embed an image in an HTML page. Images are not technically inserted into a web page; images are linked to web pages.
25. What is SRC in HTML?
Ans. The src attribute specifies the location (URL) of the external resource.
PART – III: LINKS, FRAMES AND FORMS IN HTML5 |
TEXTUAL QUESTIONS AND ANSWERS |
EXERCISE
I. FILL IN THE BLANKS:
1. The web pages of a website are linked to each other using _____________.
Ans. hyperlink.
2. The attribute ______________ is used to create a hyperlink between two or more HTML codes.
Ans. href.
3. When you move the mouse pointer over a link, the mouse pointer changes its shape from an arrow to a _____________.
Ans. pointing hand.
4. The _______________ attribute of the <audio> tag indicates that you can replay the audio file once it is finished.
Ans. loop.
5. The small rectangular areas created in the main browser window are known as _______________.
Ans. frames.
6. The ________________ attribute of the frame tag tells the browser which HTML page to load into that frame.
Ans. src.
7. ______________ attribute of the frame tag attaches the default URL.
Ans. Sre.
8. ______________ allows multiple HTML documents to be presented as independent windows within one browser window.
Ans. Inline frame.
9. The _______________ tag collects the information from the user.
Ans. input.
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.
(i) Hyperlink.
(ii) URL.
(iii) Address.
(iv) none of these.
Ans. (i) Hyperlink.
2. The ____________ attribute of the <a> tag is used to set the URL of the target resource.
(i) src.
(ii) href.
(iii) Controls.
(iv) none of these.
Ans. (ii) href.
3. Which of the following can be embedded in a web page?
(i) Audio.
(ii) Video.
(iii) Both (i) and (ii).
(iv) None of these.
Ans. (iii) Both (i) and (ii).
4. The _____________ attribute of the <video> tag plays the video file automatically on loading a web page.
(i) controls.
(ii) Autoplay.
(iii) Height.
(iv) none of these.
Ans. (ii) Autoplay.
5. ______________ tag is used to create textbox, radio button and checkbox on the web page.
(i) <OPTION>
(ii) <INPUT>
(iii) Both of these.
(iv) None of these.
Ans. (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?
Ans. Rohan must use <iframe> tag to divide a web page into four sections.
Syntax:
<iframe src = “URL” title = “description”> </iframe>
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?
Ans. Rahim must use the following tags:
To insert images to his web page – <img> tag
To create link – <a> tag
To insert video clips – <video> tag
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?
Ans. To link to the external links, Ritika must use the following taga and syntax.
The tag to be used- <A> tag
Syntax:
<A href = “destination file name” >Link </A>
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?
Ans. To create the form, Priyanka has to use <FORM> tag.
IV. ANSWER THE FOLLOWING:
1. Why do you include hyperlinks in your web page? Give any two reasons.
Ans.
- Hyperlinks allow us to link documents to other documents or resources.
- Hyperlink point to a specific section or element within the same webpage or document.
2. Distinguish between the internal and external linking.
Ans. Internal linking: 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.
External linking: 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?
Ans. HTML frames are used to divide your browser window into multiple sections where each section can load a separate HTML document.
The main advantage of frames is that it allows the user to view multiple documents within a single Web page.
4. What are two types of text input in HTML web forms?
Ans.
- Text Input Controls.
- Checkboxes Controls.
5. Which input control is most useful for questions requiring a simple yes or no answer?
Ans. Radio Box Controls.
6. What is the use of password control in HTML forms?
Ans. This is also a single-line text input but it masks the character as soon as a user enters it. They are created using HTML <input> tag.
7. What is the use of <INPUT> tag?
Ans. The input tag is used within <form> element to declare input controls that allow users to input data. An input field can be of various types depending upon the attribute type.
8. What are the uses of Submit and Reset buttons?
Ans. Submit button, submits the information which you have entered in the form to the owner who created the form.
Reset button, resets the information which you have entered, that is the form will become empty, but reset button works only when you haven’t submitted the form.
V. LAB ACTIVITY:
1. Create a web page where a person has to choose a day of the month from a drop — down list. The page should also allow the person to enter two lines on what the person plans to do on.
Ans. Code:
Output:
2. Create an HTML document on the topic HTML list and HTML Tables. The web page should contain two frames wherein in one frame will HTML List and in other HTML Tables.
Ans.
Code (list.html)
<! DOCTYPE html>
<html>
<head>
<title> HTML List</title>
</head>
<body>
<ol>
<li> Coffee </li>
<li>Tea </li>
<li> Milk </li>
</ol>
</body>
</html>
Output (list.html):
Code (table.html):
<!DOCTYPE html>
<html>
<head>
<title> Colours and their Hex codes </title>
</head>
<body>
<H1> MAJOR HEXADECIMAL COLOR CODES </H1>
<P> Below are some of the common color names and codes. </P>
<TABLE border = 2 width = 80%>
<TR>
<TH> Color Name </TH>
<TH> Color Code </TH>
<TH> Color Name </TH>
<TH> Color Code </TH>
</TR>
<TR>
<TD bgcolor = #FF0000> RED </TD>
<TD> #FF0000 </TD>
<TD bgcolor = #00FFFF> CYAN </TD>
<TD> #00FFFF </TD>
</TR>
<TR>
<TD bgcolor = #FFFFFF> WHITE </TD>
<TD> #FFFFFF </TD>
<TD bgcolor = #0000FF> BLUE </TD>
<TD> #0000FF </TD>
</TR>
<TR>
<TD bgcolor = #FFFF00> YELLOW </TD>
<TD> #FFFF00 </TD>
<TD bgcolor = #000000> BLACK </TD>
<TD> #0000FF </TD>
</TR>
</TABLE>
</body>
</html>
Output (table.html):
Code (frame.html):
Output (frame.html):
ADDITIONAL QUESTIONS AND ANSWERS |
1. What is hyperlink?
Ans. A hyperlink is a text or an icon that you can click on to get to another website. The link, which is usually in blue and is underlined, serves as a reference point that connects a particular page to other pages over the web.
2. Name the tag that is used to define a hyperlink.
Ans. The HTML <a> tag defines a hyperlink. It has the following syntax: <a href = “url” > link text </a>
3. Why hyperlinks are used in HTML?
Ans. Hyperlinks create links: a clickable text or image that, when clicked, takes us to a new page or to a different part of the same page.
4. How do we hyperlink an image in HTML? Write the syntax.
Ans. To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image.
Syntax:
<a href =” link file name”> <img src = “image file name”> </a>
5. Write the difference between internal linking and external linking.
Ans. 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.
When one page is linked to another web page of the same website or another website, it is called external linking.
6. Is href a link?
Ans. The href attribute link (short for “Hypertext REFerence”) indicates the relationship between pages to search engines. href is an attribute of the anchor tag. The href attribute indicates the destination of the hyperlink.
7. What is the difference between HREF and SRC?
Ans. HREF – Hyperlink Reference | Often used in tags to reference another page or web link. SRC – Source | Often used in tags to give the web page the source of an image, video or file.
8. What is the use of target attribute in <a> tag? What are its values?
Ans. Target attribute specifies the default browsing context to load the URL into. Only to be used when the href attribute is present.
Possible values:
- _blank
- _self
- _top
- _parent
9. What is the difference between link, alink, vlink?
Ans. The link color is the color a link will appear before it has been clicked.
- The alink (active link) color appears while the mouse is clicking the link.
- The vlink (visited link) is the color of the link after the user has already visited it.
10. What is the default color of link, alink and vlink?
Ans. The default color of —
- Link — Blue
- Alink — Red
- Vlink — Purple
11. What are the properties of a hyperlink using CSS?
Ans.
Properties | Description |
a:link | It signifies the unvisited hyperlinks |
a:visited | It signifies the visited hyperlinks |
a:hover | It signifies on element on which the user’s mouse is hovering over it |
a:active | It signifies the element on which the user is currently clicking |
12. What is audio and video tags in HTML?
Ans. The HTML5 <audio> and <video> tags make it simple to add media to a website. You need to set src attribute to identify the media source and include a controls attribute so the user can play and pause the media.
13. What is <audio> tag?
Ans. The <audio> tag is an inline element that is used to embed sound files into a web page.
14. What is <video> tag?
Ans. The <video> tag is used to embed video content in a document, such as a movie clip or other video streams.
15. What are the attributes of <audio> tag?
Ans.
Attribute | Description |
src | Specifies the URL (path) of the video file |
controls | Displays the controls on the web page |
autoplay | Plays the video file automatically when the web page is loaded |
loop | Replays the audio file |
16. What are the attributes of <video> tag?
Ans.
Attribute | Description |
src | Specifies the URL (path) of the audio file |
controls | Displays the controls on the web page |
autoplay | Plays the audio file automatically when the web page is loaded |
height | Specifies the height of the video player displayed |
width | Specifies the width of the video player displayed |
17. How do we embed audio in HTML5? Write the syntax.
Ans. To embed audio in HTML, we use the <audio> tag.
Syntax:
<audio src = “sample music.wav” autoplay controls>
18. How do we embed video in HTMLS? Write the syntax.
Ans. To embed video in HTML, we use the <audio> tag.
Syntax:
<video src = “sample video.mp4” width-300 height = 300 autoplay controls>
19. What is iframe used for in HTML?
Ans. An inline frame (iframe) is a HTML element that loads another HTML page within the document.
20. Write the syntax of iframe.
Ans. <iframe src=” “URL” title = “description” > </iframe>
21. Explain the border property of iframe.
Ans. Border properties can be applied in the following ways:
- Border-width: value, where value = thin, thick, medium or numeric value
- Border-style: value, where value = none, hidden, dotted, dashed, solid, double, groove, ridges, inset or outset
- Border-color: value, where value = color name
22. What is form in HTML?
Ans. An HTML form is a section of a document which contains controls such as text fields, password fields, checkboxes, radio buttons, submit button, menus etc.
23. Why forms are used in HTML?
Ans. An HTML form is used to collect user input. The user input is most often sent to a server for processing.
24. What are the form controls?
Ans. A form control is a user interface control that serves as the point of connection between the user and the server.
25. What are the different types of HTML Form Controls?
Ans. There are different types of form controls that you can use to collect data using HTML form—
- Text Input Controls
- Checkboxes Controls
- Radio Box Controls
- Select Box Controls
- File Upload Controls
- Field set Control
- Submit and Reset Button
26. What are different types of text input used on forms?
Ans. There are three types of text input used on forms “
- Single-line text input controls “This control is used for items that require only one line of user input, such as search boxes or names. They are created using HTML <input> tag.
- Password input controls “This is also a single-line text input but it masks the character as soon as a user enters it. They are also created using HTML <input> tag.
- Multi-line text input controls “This is used when the user is required to give details that may be longer than a single sentence. Multi-line input controls are created using HTML <textarea> tag.
27. What is checkbox control used for?
Ans. Checkboxes are used to let the user select one or more options from a predefined set of options. Checkbox input controls are created using the “input” element with a type attribute having value as “checkbox”.
28. What is radio button control used for?
Ans. Radio buttons are used when out of many options, just one option is required to be selected. Radio Button input controls are created using the “input” element with a type attribute having value as “radio”.
29. What is select box control used for?
Ans. A select box, also called drop down box which provides option to list down various options in the form of drop-down list, from where a user can select one or more options.
30. What is file upload box control used for?
Ans. A file upload box allows a user to upload a file to your web site, you will need to use a file upload box, also known as a file select box. File Upload Box controls are created using the “input” element with a type attribute having value as “file”.
31. What is file FieldSet control used for?
Ans. The <fieldset> element in HTML is used to group the related information of a form. This element is used with <legend> element which provide caption for the grouped elements.
32. What is button control?
Ans. The <button> tag is used to create a clickable button within HTML form on our webpage.
33. What are the button types in HTML?
Ans. There are three types of buttons:
- submit — Submits the current form data. (This is default.)
- reset — Resets data in the current form.
- button — This creates a button that is used to trigger a client-side script when the user clicks that button.
34. What is the difference between submit and reset button in HTML?
Ans. The submit-button must always be the last value selected, as it initiates the form submission whereas the reset-button can be pressed at all times during the form fill out.
35. What does a submit button do?
Ans. The <input type = “submit”> defines a button for submitting the form data to a form-handler. The form-handler is typically a file on the server with a script for processing input data.
36. What is the syntax of <input> tag? What are its attribute values?
Ans. The syntax of <input> tag is
<input type = “value”>
The type attribute specifies the type of <input> element to display.
The different attribute values the <input> tag can use are as follows:
Value | Description |
Text | Defines a single-line text field |
Checkbox | Defines a checkbox |
Radio | Defines a radio button |
Button | Defines a clickable button |
Password | Defines a password field |
Submit | Defines a submit button |
Reset | Defines a reset button |
37. What is the syntax of <select> tag?
Ans. HTML <select> tag is used to create a drop-down list with multiple options. The <option> element is nested within <select> tag for defining options in a list.
Syntax:
<select>
<option> </option>
</select>
38. What is the difference between radio button and checkbox?
Ans. The difference between radio button and checkbox are:
39. What the meaning of the code: <input type = “password”>
Ans. The <input> element of type “password” allow a user to enter the password securely in a webpage. The entered text in password filed converted into “*” or “.”, so that it cannot be read by another user.
40. What the meaning of the code: <input type = “reset”>
Ans. The <input> type “reset” is also defined as a button but when the user performs a click event, it by default reset the all-inputted values.
SEBA Class 10 Computer Science Book PDF | SEBA Class 10 Computer Science Notes | SEBA Class 10 Computer Science PDF Download | SEBA Class 10 Computer Science Questions and Answers | SEBA Class 10 Computer Science Solutions PDF Download | SEBA Class 10 Computer Science Solutions Book PDF | SEBA Class 10 Computer Science Book PDF Download.
Hi! I’m Ankit Roy, a full time blogger, digital marketer and Founder of Roy Library. I shall provide you all kinds of study materials, including Notes, Suggestions, Biographies and everything you need.