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:- Comment
(3) HTML document is saved with an extension_____________.
Ans:- .html or. htm
(4)___________are used to view the HTML documents.
Ans:- Web browser
(5) The _____________ element includes both on and off tags.
Ans:- Container
(6) The____________element splits the line and displays the text on the new line.
Ans:- <br>

II. Multiple Choice questions

(1) Which is the correct way to comment out something in HTML?
(a) Using ## and #
(b) Using <!–and –>
(c) Using </– and -/->
(d) Using <!– and -!>
Ans: (b) Using <!–and –>
(2) The —————- tag draws a horizontal line across the web page.
(a) <br>
(b) <hr>
(c) <line>
Ans: (b) <hr>
(3) ————– provides a set of styles rules for defining the layout of the HTML documents.
(a) CSS
(b) WSS
(c) TSS
Ans: (a) CSS
(4) A property and its value are collectively known as————-
(a) Selector
(b) Attribute
(c) Declaration
Ans: Attribute
(5) Which tag indicates the beginning and end of the HTML documents?
(a) <HEAD>
(b) <BODY>
(c) <HTML>
Ans: (c) <HTML>
(6) Which of the following is used to define the style for a single HTML page?
(a) Inline CSS
(b) Internal CSS
(c) External CSS
Ans: (b) 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?
Ans :- Yashvi can use inline CSS to add styles directly to an HTML document. An inline CSS uses the style attribute of an HTML element.
Syntax to use the style attribute with a tag is as follows :
<TAGNAME STYLE=”PROPERTY : VALUE;”>
Example:
<BODY STYLE=”BACKGROUND-COLOR: YELLOW; COLOR:BLUE”>

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 for dividing his web page into different sections so that the content is easily readable.
The attributes that he can use to define some extra properties of<HR> tag are as follows:-
a. SIZE :- Specify the thickness of the line.
Syntax: <HR SIZE = VALUE IN PIXEL>
Example: <HR SIZE=4>
b. WIDTH :- Specify the width of the line in percentage.
Syntax: <HR WIDTH = WIDTH VALUE IN PERCENTAGE>
Example: <HR WIDTH = 50%>
c. COLOR :- Specify the color of the line.
Syntax: COLOR <HR COLOR=COLOR NAME>
Example: <HR COLOR=RED>
d. 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.
Syntax: <HR ALIGN = LEFT/RIGHT/CENTER>
Example: <HR ALIGN=RIGHT>
e. NOSHADE :- Specifies that a <HR> element should render in one solid color and noshaded.
Example: <HR SIZE=20 NOSHADE>

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.
Syntax : <BODY BACKGROUND=IMAGE FILE NAME WITH PATH>

IV. ANSWER THE FOLLOWING:

1. What is a markup language?
Ans:- A markup language is used to define the text document within tag which defines the structure of web pages. Markup language makes text more interactive and dynamic. It can turn text into images, tables, links, etc.

2. Write some feature of HTML.
Ans:- The some features of HTML are :-
a. It is a very easy and simple language. It can be easily understood and modified.
b. It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
c. It is a markup language, so it provides a flexible way to design web pages along with the text.
d. 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.
e. It is platform-independent because it can be displayed on any platform like Windows, Linux, and Macintosh, etc.
f. It facilitates the programmer to add Graphics, Videos, and Sound to the web pages which makes it more attractive and interactive.

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.
Example:- <p>, <html>, <body>,<h1>, <img>, etc.
Attribute: HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML elements.Attributes should always be applied with start tag.
Example:-
<a href=”https://sebahelp.com/”>Visit SebaHelp </a>

4. How are comments useful?
Ans:- Comments are useful due to the following reasons :-
a. Comments are used to make the program more readable by adding the details of the code.
b. Comments makes easy to maintain the code and to find the errors easily.
c. Comments helps the coder and reader to understand the piece of code used for especially in complex source code.

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.
The methods for applying Style rules in an HTML document are as follows :-
a. Inline CSS :- An inline CSS is used to apply a unique style to a single HTML element.
b. Internal CSS :- An internal CSS is used to define a style for a single HTML page.
c. 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:-The differentiate between Internal CSS and External CSS are as follows :-
a. An internal CSS is used to define a style for a single HTML page, whereas an external style sheet is used to define the style for many HTML pages.
b.An internal CSS is defined in the <head> section of an HTML page within a <style> element, whereas to use an external style sheet, we have to add a link in the <head> section of each HTML page.

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.
Code :-

<HTML>
<HEAD>
<TITLE>Invitation Card</TITLE> <style type="text/css">
body {background-color: white}
h1 {font-family: monotype corsiva; font-size: 56; color:red}
P{font-family: italic; font-size: 28;color:rgb(131, 15, 15)}
</style>
</HEAD>
<BODY>
<H1 ALIGN=CENTER>Birthday <BR> Party </H1>
<H3 ALIGN=CENTER>You are invited!!!</H3>
<HR WIDTH="70%" SIZE=5 COLOR-BLUE>
<P>Shubra is turning 15!<P>
Sunday, May 25<SUP>TH</SUP> at 7 pm <BR>
Riya Place <BR> Silchar, Assam<BR><BR>
</BODY> 
</HTML>

2. Create a web page that serves as a guide for the mathematical formulas using HTML tags along with CSS properties.
Code :-

<HTML>
<HEAD>
<TITLE>Mathematical Formulas</TITLE>
<style type="text/css">
body (background-color: cyan)
h1 (font-family: monotype corsiva; color:red}
h3 (font-family: monotype RED SERIFS; color:red}
</style>
</HEAD>
<BODY>
<H1 ALIGN=CENTER> MATHEMATICAL FORMULAS </H1>
<HR WIDTH="50%" SIZE-5 COLOR-BLUE>
<H3 ALIGN=CENTER>
(a + b) <SUP>3</SUP>= a <SUP>3</SUP> +3a<SUP>2</SUP>b+3ab<SUP>2</SUP>+b<SUP>3</SUP> <br>
(a - b) <SUP>3</SUP>= a <SUP>3</SUP> -3a<SUP>2</SUP>b+3ab<SUP>2</SUP>-b<SUP>3</SUP> <br>
a<SUP>2</SUP> -b <SUP>2</SUP>= (a+b) (a - b)
</H3>
</BODY>
</HTML>

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here