0% found this document useful (0 votes)
5 views

HTML

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

HTML

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Select the correct alternative and rewrite the

following.
1.____________tag is used for superscript in HTML.

Asked in Board Exam (Oct. 2002) Important


(i) <SUPER>

(ii) <SUP>

(iii) <UP>

(iv) <SUPERSCRIPT>

Ans : (ii) <SUP>

2.HTML stands for ________________

Asked in Board Exam (Oct. 2004, Oct 2005) Important


(i) Hyper Text Mark up language

(ii) High Text Manipulation Language

(iii) Hyper Text Manipulation Language.

(iv) High Text Markup Language

Ans (i) Hyper Text Mark up language

3.To display defination lists on your web page _________ tag is used.

(i) <DLIST>

(ii) <OL>

(iii) <LI>

(iv) <DL>
Ans : (iv) <DL>

4. Long form of HREF is ____________

Asked in Board Exam (March 2020) Important


(i) Horizontal reference

(ii) Hypertext reference

(iii) Hyperlink reference

(iv) Hypermedia reference

Ans. : (ii) Hypertext reference

5. RGB code for BLACK color is _____________

(i) FF0000

(ii) FFFFFF

(iii) 00000F

(iv) 000000

Ans : (iv) 000000

6. Which of the following color name is not allowed to used in HTML _____________

(i) OLIVE

(ii) PURPLE

(iii) ORANGE

(iv) FUCHSIA
Ans. : (iii) ORANGE

7. _____________ tag is used to put a line break in HTML code.

Asked in Board Exam (March 2003) Important


(i) <HR>

(ii) <BR>

(iii) <P>

(iv) <TI>

Ans : (ii) <BR>

8. To place the image into an HTML file _________________ attribute is used in IMG tag.

(i) <URL>

(ii) <ALT>

(iii) <SRC>

(iv) <HREF>

Ans : (ii) <SRC>

9. VB Script can be executed in _____________ web browser.

(i) Netscape Navigator

(ii) InternetExplorer

(iii) Both

(iv) None of these


Ans. : (iii) Both

10. The long form of SGML is ________________

Asked in Board Exam (March 2005) Important


(i) Standard Global Machine Language

(ii) Standard Global Markup Language

(iii) Standard Generalized Machine Language

(iv) Standard Generalized Markup Language

Ans : (iv) Standard Generalized Markup Language

11. ___________ is the name of the web browser.

Asked in Board Exam (Oct. 2006) Important


(i) Embedded system

(ii) Netscape Navigator

(iii) Oracle

(iv) C++

Ans: (ii) Netscape Navigator.

12. _______ tag is used for scroll the text.

Asked in Board Exam (Mar. 2007, 09) Important


(i) <STRIKE>

(ii) <MARQUEE>

(iii) HR
(iv) None of these

Ans : (ii) <MARQUEE>

Q.1 What is HTML ?


Asked in Board Exam (Oct. 2002,03 ; Mar. 2006,09,14) Important
Ans : 1) It is the most simple, text oriented programming language.

2) HTML stands for HyperText Mark-up Language, used to create world wide web document.

3) Using this language user can create web pages which can be viewed in any web browser
such as Netscape Navigator , Internet Explorer, chrome, firefox, Microsoft Edge, Opera etc.

4) Hypertext is ordinary text with extra features such as formatting, images, multimedia and
links to other documents.

5) Mark-up is the process of taking ordinary text and adding extra symbols, such as editor’s
Proof reading symbols. Each of the symbol used for mark-up in HTML is command that tells
the browser how to display the text.

6) Mark-up languages are special type of computer languages. They are concerned with only
Parts of documents according to their functions.

7) They indicate which part of document is title, which is subheading, which is author’s name
and so on.

8) HTML is essentiallly a set of instructions to web browser for formatting and lay out of pages.

9) HTML is not a programming language in real sense.

Q. 2 Explain features of HTML.


Asked in Board Exam (March 2002) Important
Ans :

1) Hypertext Markup Language or HTML is a set of codes that is used to create document and
then it can be published on the World Wide Web (www) .

2) HTML lets user jump from topic rather than finding and reading information linearly

3) Documents prepared in HTML include reference graphics and formatting tags.


4) HTML is hyperlink specification language.

5) HTML supports to frames including target windows and borderless frames.

6) It contains powertul formatting facilities for text, page, images etc.

7) it defines the syntax and placement of special embedded directions which are not displayed
by the browser but it tells the browser how to display the contents of the document.

8) It supports for .BMP, .png, .jpeg and animated .GIF images.

9) HTML support forms which make it possible to create documents that collect and process
users input.

10) It tells how to make a document interactive through special hypertext links.

WHY HTML ? ADVANTAGES AND DISADVANTAGES

Q.3 What are advantages of HTML ?


Asked in Board Exam (Oct. 2002,03,09 ; March 2006,09,14) Important
Ans: The advantages of HTML are as enlisted below :

1) For creating HTML document, only text editor is needed. No special software is needed.

2) HTML document can be created on any hardware platform using any text editor.

3) HTML is easy to learn, use of implement.

4) Contains powerful formatting facilities.

5) Required HTML pages can be updated easily, without changing whole document.

6) Any HTML document can be traversed due to hyperlinking tacility is available.

7) Independent work can be done and need not to worry about editing programs.

8) If something is not working, then finding error is easy in HTML.

9) HTML will not cost anything for its use. There are NO expensive licenses to buy or no need
to upgrade to purchase.
10) Learning HTML is simple than any Programming language.

Q. 4 Give the disadvantages of HTML.


Asked in Board Exam (Oct. 2002,03,14 ; March 2006,09) Important
Ans :

1) HTML is not a programming language in true sense.

2) Any simple calculation cannot be done in HTML.

3) It cannot be used to display even date.

4) The interactive web pages cannot be built by HTML.

5) The web pages developed in HTML cannot behave like an application.

6) The web pages developed in HTML do not have their own interface.

7) Hyperlink is provided in HTML. But for that we need a trip to server at each step.

STUDY OF TAGS

Q.5 What is HTML ? Name any two softwares that


are used for writing HTML codes state any one
advantages and one disadvantages of HTML.
Asked in Board Exam (Oct 2002) Important
Ans : (Please refer Q.No 1, 3, 4)
Points are given below Study this.

HTML is HyperText Mark-up Language

1) It is the most simple, text oriented programming language.

2) HTML stands for HyperText Mark-up Language, used to create world wide web document.
3) Using this language user can create web pages which can be viewed in any web browser
such as Netscape Navigator , Internet Explorer, chrome, firefox, microsoft edge, etc.

4) Hypertext is ordinary text with extra features such as formatting, images, multimedia and
links to other documents.

5) Mark-up is the process of taking ordinary text and adding extra symbols, such as editor’s
Proof reading symbols. Each of the symbol used for mark-up in HTML is command that tells
the browser how to display the text.

6) Mark-up languages are special type of computer languages. They are concerned with only
Parts of documents according to their functions.

7) They indicate which part of document is title, which is subheading, which is author’s name
and so on.

8) HTML is essentiallly a set of instructions to web browser for formatting and lay out of pages.

9) HTML is not a programming language in real sense.

The advantages of HTML are as enlisted below :

1) For creating HTML document, only text editor is needed. No special software is needed.

2) HTML document can be created on any hardware platform using any text editor.

3) HTML is easy to learn, use of implement.

4) Contains powerful formatting facilities.

5) Required HTML pages can be updated easily, without changing whole document.

6) Any HTML document can be traversed due to hyperlinking tacility is available.

7) Independent work can be done and need not to worry about editing programs.

8) If something is not working, then finding error is easy in HTML.

9) HTML will not cost anything for its use. There are NO expensive licenses to buy or no need
to upgrade to purchase.

10) Learning HTML is simple than any Programming language.

The disadvantages of HTML are given below


1) HTML is not a programming language in true sense.

2) Any simple calculation cannot be done in HTML.

3) It cannot be used to display even date.

4) The interactive web pages cannot be built by HTML.

5) The web pages developed in HTML cannot behave like an application.

6) The web pages developed in HTML do not have their own interface.

7) Hyperlink is provided in HTML. But for that we need a trip to server at each step.

Softwares that are used for writing HTML codes are :


(1) Notepad in Windows
(2) Simple Text in Macintosh
(3) Pico in Unix

Q.6 What are tags ? Explain.


Ans:

1) A tag is a single unit of mark-up. It is a set of symbols defined in HTML to have special
meaning. Tags are instructions that are written directly into text edition.

2) Tags start with a less than sign (<) followed by a keyword and end with greater than (>) sign.
These symbols together known as angle brackets.

3) The tag part is a code usually one or two letter, that specify the type of effect.
There are two types of tags in HTML :
(i) Start tags
(ii) End tags

4) Start tags are used tq begin an effect, and end tags are used to end that effect. Name of
end
tag is same as that of start tag but the name of end tag is preceded by a forward slash (/).

<I> is Italic tag.

The text written between start tag <I> and end tag </I>

HTML
<I> HTML </I>
Here, the word ‘HTML’ will be displayed in italics.

5) Tags can be nested within each other.

HTML
<B> <I> Hello </I> </B>

For eg. Hello


The attributes are inserted rigth within the tag that are used to affect tag’s behaviour.

Q.7 Give the structure of HTML web page.


Asked in Board Exam (Oct.2011,14) Important
Ans : 1) Every HTML document has the same structure and it consists of few tags that define
the page as a whole.

2) The primary part of an HTML document are denoted by <HTML>, <HEAD> , <BODY> and
tags. Each of these tags are known as Document Structure Tags.

3) HTML file always starts with <HTML> tag. Similarly ended with </HTML> tag. It declare text
within web page viewed in a web browser.

4) HTML document can be divided into two sections :

(a) The head : It is like an introduction to the page. It generally consists of title of the page To
define head, add <HEAD> tag at beginning and </HEAD> tag at end of heading.

(b) The body : In this user enters the text images and other tags that will actually appear the
web page.

To define the body, place <BODY> tag at beginning and </BODY> tag at the end after the head
section.

These tags define the basic structure of every web page.


Basic HTML Strcture of every web page

Q. 8 What are essential and basic tags of HTML


code? OR Explain the purpose of following tags in
HTML

(i)<HTML>
(ii)<HEAD>
(iii)<TITLE>
(iv) <BODY>
Ans: The essential and basic tags of HTML code are <HTML> , <HEAD>, <TITLE> and <BODY>

(i) <HTML>

1) In order for the browser to open the HTML file, it must be told that the file is an HTML file.

2) This can be done by making the beginning of the file with <HTML> tag and end of file with
</HTML> tag.

3) All other tags must inside within the <HTML> ….. </HTML> tag.

4) The following example beginning and ends a document with HTML tag.

HTML
<HTML>
<BODY>
This is HTML file,
</BODY>
</HTML>

(ii) <HEAD> :
1) <HEAD> tag defines the header area of the page which is not displayed within the page
itself in the browser.

2) In the <HEAD> section, <TITLE> tag can be used for give the title for the web page. The end
tag </HEAD> ends the header area of the page.

3) For example :

HTML
<HTML>
<HEAD>
<TITLE> WELCOME TO FIRST WEB SITE</TITLE>
</HEAD>
<HTML>

(iii) <TITLE> :

Asked in Board Exam (Oct. 2002) Important


1) The text between start tag <TITLE> and end tag </TITLE> is the title of the web page and is
displayed in the title bar of browser.

2) The title should be discriptive as it is frequently used by web indexing and searching
programs to name your web page.

3) There should not be extra space between title tag and text of title.

iv) <BODY> :

Asked in Board Exam (March 2008 ; Oct. 2005) Important


1) The actual contents of the web page that will be displayed on browser will appear in body
section of document.

2) The body section starts with <BODY> tag and ends with </BODY> tag.

3) There are several optional attributes for this tag, such as set background images, change
the font of text by using attributes.

4) The <BODY> …. </BODY> section defines the actual instructions for laying out graphics, text,
multimedia and other elements in the browser’s work’s area.
Q.9 Explain the procedure to prepare and view
HTML document.
Ans : The procedure to prepare and view HTML document is as follows :
Step 1 : Open a text editor e.g. : Notepad.
Step 2 : Write the appropriate HTML code.
Step 3: Save the HTML code in a file having extension HTML.
Step 4: Open the Browser e.g.: Internet Explorer.
Step 5: Browse the file or type in the appropriate address of the HTML file in the address bar,
view the HTML page.

Q. 10 Explain the following tags in HTML :


(i) <P> tag
(ii) <BR> tag
(iii) <HR> tag
Asked in Board Exam (March 2007,11 : Oct 2005, 06) Important
Ans :

(i) <p> tag :

1) <p> tag is used for creating paragraph of text.

2) A paragraph can be created by enclosing text within paragraph codes <p> and </p>

3) The browser ignores the paragraph created by user while writing codes by pressing, ‘Enter’. User must specifically
define a paragraph in the code by using a Paragraph tag.
4) The <p> tag has one optional attribute called align. It is used to specify where the text appear on screen.

HTML
(i) <P align = left> Left alignment like normal text. </P>
(ii) <P align = right> Text is aligned to right margin, but not justified to left. </P>
(iii) <P align = center> Text is centered. </P>
(iv) <P align = Justify> Text is justified to left and right margin. </P>

(ii) <BR> tag :

Asked in Board Exam (Oct. 2002, 2004) Important


Ans:

1) <BR> tag insert line break into a text flow.

2) It tells the browser to wrap the text that follows onto a new line without inserting any extra space between the lines.

3) e.g.

HTML
Sonia Gandhi, <BR> 10 Janpath, <BR> New Delhi.
4) For an entire blank line <BR> tag on that line. For multiple blank lines, just count them and type
<BR> tag on every expected blank line.

(iii) <HR> tag :

Asked in Board Exam (Mar. 2016; Oct. 2006) Important


1) A web page can be divided into separate sections by using horizontal rulers, <HR> tag.
It is also called as horizontal line.

2) This tag is mostly used for decorative purposes.

3) The <HR> tag takes several optional attribution. For example, to specify line width and how much of the browser’s
window it should span (as a percentage) such as

HTML
<HR SIZE = "6" COLOR="red" WIDTH = "60%">

This displays a line of six pixels thick that spans 60 percent of the browsers windows: The default is to center in the
window.

(iv) <PRE> tag

Asked in Board Exam (March 2004,07,12 ; Oct. 2003,06,14) Important


(1) <PRE> Is used to preformat the text. The text appearing between start <PRE> tag and end tag
</PRE> is displayed in mono space form.

(2) This tag is used to position the characters.

(3) This tag displays the text in exactly same format as the character and line spacing format defined in source HTML
document.

(4) For example :

HTML
<PRE>
1
1 1
1 2 1
1 3 3 1
</PRE>

Q. 11 How text is formatted by using <B> , <I> and <U>


tags?
Ans :

To give additional emphasis to the text, HTML provides bold face, italics and underlining the words. This can be done
by using <B> , <I> and <U> tags as :

(i) <B> tag :


Asked in Board Exam (Mar. 2005,13) Important
<B> is bold tag. The text appearing between start tag (<B>) and end tag (</B>) will be displayed in bold letters.

HTML
e.g. <B> Bold Text </B>

ii) <I> tag :

<I> is italic tag. The text appearing between start tag (<I>) and end tag (</I>) will be displayed in italics.

HTML
e.g. <I> Italic Text </I>

iii) <U> tag :

Asked in Board Exam (Oct. 2007) Important


<U> is underline tag. The text appearing between <U> and </U> tag will be underlined.
Generally, browser indicates hyperlinks in web pages by underlining them. So it is generally
avoided.

HTML
e.g.<U> underline text </U>.

Q.12 Explain the purpose of following tags in HTML


with example.
(a) <marquee>
(b) <SUP>
(c) <HR>
Asked in Board Exam (March 2002,04,08) (Oct. 2002, 14) Important
(a) <marquee>

(1) It is used for scrolling the text and images on screen from right to left.
(2) The text written between start <marquee> tag and end </marquee> will scroll on screen in horizontal line.

HTML
For e.g. :
<marquee> computer science </marquee>

(3) There are several attributes associated with such as BGCOLOR, HEIGHT and WIDTH.
(4) This is used to scroll the current news or position of different companies in stock market.

HTML
<marquee behavior="scroll" direction="right" scrollamount="5" bgcolor="yellow" width="90%">
This text will scroll from left to right within a yellow background.
</marquee>

(b) <SUP> :
Asked in Board Exam (March 2004) Important
1) <SUP> is superscript tag.

2) The text enclosed within <SUP> (start tag) and </SUP> (end tag) is displayed in superscipt form.

HTML
For eg. : 2 <SUP> 2 </SUP> = 4

It will be displayed as : 2² = 4

(c) <HR> :

(1) <HR> tag is horizontal rule tag, also called as horizontal line.

(2) A web page can be divided into separate sections by using horizontal rule <HR> tag

(3) This tag is mostly used for decorative purposes.

(4) <HR> tag takes several attributes such as COLOR, SIZE, WIDTH etc.

For e.g. :

HTML
<HR SIZE = "6" COLOR="black" WIDTH = "60%">

This displays a line of six pixels thick that spans 60 percent of the browser’s window.

(5) The default is to center in the window.

eg : < HR NO SHADE > This means for an unshaded horizontal line.

Q. 13 What is tag <EM> ? What is the difference


between <EM> tag and <I> tag ?
(Mar. 2013)

1) <EM> is emphasis tag. The text appearing between start tag (<EM>) and end tag (</EM>) will be displayed in
italics. This tag is used to empasize the text.

2) The main difference between <EM> tag and <I> tag is that text to speech browsers given spoken emphasis to the
text within emphasis tags, while no such emphasis is given to text within italic tags.

HTML
For eg: . <P> you <EM> must </EM> handover the money to him </P>
Q. 14 What is <Strong> tag ? What is the difference
between <Strong> and <B> tags?
Ans :
(1) <Strong> is strong tag. The text appearing between start tag (<Strong>) and end tag (</Strong>) will be displayed
in bold.

(2) This tag is used to create strong emphasis.

(3) The main difference between <Strong> and <B> tags is that the text to speech reader gives
strident pronunciation to the strong text, while no such strident pronunciation given to bold
text.

HTML
For eg.
<P> If they don't give me that raise <STRONG> tomorrow </STRONG>, I quit </P>

Q.15 How can unordered lists be created ?


Asked in Board Exam (Oct. 2006, Mar. 2007) Important
Ans. : 1) An unordered list is a list of items that have no particular order or sequence.

2) Unordered lists requires start and end tags (<UL> and </UL>)

3) A special <LI> tag is used to indicate actual list elements.

4) Unordered list are bulleted lists, They can be preceded by one of the several bullet styles
like a

Closed Circle:

Open Circle

Square

HTML
<UL>
<LI> Eggs </LI>
<LI> Milk </LI>
<LI> Apples </LI>
</UL>

5) Both <UL> and <LI> and has same set of attributes given below.
TYPE = “CIRCLE”
TYPE = “DISC”
TYPE.= “SQUARE”

The CIRCLE attribute value is used for hollow circle (🔘), the DISC type creates a solid
bullet (⚫) while SQUARE value creates a solid block (◼). The default appearance for a list is
with disc.

6) The end tag (</UL>) is always required at the end of unordered list. Also use </LI> at the end
of each list item.

16 How ordered lists are created ? OR Explain the


use of <OL> tags with example.
Asked in Board Exam (March 2005, Oct.2014) Important
Ans. : 1) An ordered list is used when the sequence of the list of items is important.

2) Ordered lists are numbered in some fashion. Ordered lists can be preceded by Arabic
numerals, upper case or lower case Roman numerals, or upper case or lower case
alphanumeric characters.

3) The tags for an ordered list are <OL> (starting tag) and </OL> (ending tag). Also <LI> tag is
used to indicate actual list element.

4) e.g

HTML
<TITLE>
Shopping List
</TITLE>
<BODY>
<OL>
<LI> Eggs </LI>
<LI> Milk </LI>
<LI> Apples </LI>
</OL>
<BODY>

5) The attributes that can be used with ordered lists are :


TYPE = “1” (Arabic numbers)
TYPE = “a” (lowercase alphanumeric)
TYPE = “A” (uppercase alphanumeric)
TYPE = “i” (lowercase Roman numbers)
TYPE = “I” (uppercase Roman numbers)
6) The default appearance for list is with arabic numbers.

7) There is another attribute START, which allows us to establish the beginning of list’s
number, sequence. It has the form – START = “number”

Q. 17 Explain the use of following tags in HTML.


Asked in Board Exam (Oct. 2015) Important
Ans : 1) <A> tag:

1) <A> is ‘anchor’ tag. It is used to create links or hyperlinks.

2) Links point to different files on the web.

3) The text or image enclosed between starting tag (<A>) and ending tag (</A>) is a link.

4) This link is clickable in a graphical browser.

5) With most browsers, the text within these tags is displayed in a different colour and
underlined.

HTML
e.g :
<A HREF = "http:\ \www.rosecards.com">
More Cards </A>

6) The object to which the link has to be made is defined by the HREF attribut. HREF refers to
hypertext reference.

2) <SUB> tag

Asked in Board Exam (March 2004, 2008 ; Oct. 2004, 2005, 2007) Important
1) <SUB> is subscript tag.

2) The text enclosed within <SUB> and </SUB> is displayed in subscript form.

3) It is bit lower than text.

4) This is useful for chemical formulae.

HTML
e.g :
H <SUB> 2 </SUB> O

It will be displayed as : H2O


3) <SUP> tag:

Asked in Board Exam (March 2004, 2005; Oct.2010) Important


1) <SUP> is superscript tag.

2) The text enclosed within ed in start tag (<SUP>) and end tag (</SUP>) will be displayed in
superscript form.

3) It is a bit higher than the normal text.

4) It is useful for mathematical formulae.

HTML
e.g.
E = mc<SUP> 2 </SUP>

It will be displayed as : E = mc 2

4) <FONT> tag:

Asked in Board Exam (Oct. 2015) Important


1) <FONT> is font tag.

2) It is used to format the size, type face and colour of enclosed text.

3) The <FONT> tag can be used with three different attributes : SIZE, FACE and COLOR.

4) The SIZE attribute can be specified in absolute or relative values ranging from 1 to 7. Using a
relative font size i.e. by putting plus or minus sign before the number will change the font size
relative to the default size.

5) The COLOR attribute is specified with a RGB code or specify a color name.

6) The FACE attribute specifies a type face that is used for the text enclosed by the font
element.

5) <BIG> tag :

Asked in Board Exam (Oct.2010) Important


1) <BIG> is big tag.

2) The text enclosed within starting tag (<BIG>) and ending tag (</BIG>) is displayed in larger
font.

3) <BIG> tag has the same effect as <FONT SIZE = “+1”> .

4) If already the size is largest, tag is ignored.


6) <SMALL> tag :

Asked in Board Exam (Oct.2010) Important


1) <SMALL> is small tag.

2) The text enclosed in <SMALL> (starting tag) and </SMALL> (ending tag) is displayed in
smaller font.

3) <SMALL> tag has same effect as <FONT SIZE = “-1”> ,

4) If already the size is smallest, then the tag is ignored.

7) <STRIKE> tag :

1) <STRIKE> is strike tag.

2) The text enclosed within the tags <STRIKE> and </STRIKE> or <S> and </S> would have a
line drawn through the middle of the text.

HTML
e.g. <S> You are mad </S>

It will be displayed as : You are mad

8) <HREF> :

1) The HREE attribute is used with <A> i.e. anchor tag.

2) HREF refers Hypertext Reference.

3) This attribute marks the anchor as the start of a link to another document or resource or to
a particular place in another document.

4) For e.g.

HTML
<A HREF = "http://www.rediff.com">
Enter your Email-id </A>

In the above e.g. “Enter your Email-id” is the hypertext link to the website indicated URL
specified i.e. rediff.com.

Q. 18 Write a short note on RGB codes.


Ans :
1) Colors in HTML can be specified by a color name or by color code, known as RGB code.

2) In RGB codes, R stands for Red, G stands for Green and B stands for Blue.

3) There are 16 color names is a HTML. They are BLACK, SILVER, GRAY, WHITE, MAROON, RED,
PURPLE, FUCHSIA, GREEN, LIME, OLIVE, YELLOW, NAVY BLUE, TEAL and AQUA.

4) RGB codes are always 6 numbers. First two numbers specify amount of red. Next two
numbers specify amount of green and last two numbers specify amount of blue.

5) By mixing these three primary colors in different amount, it is possible to derive any colors.

6) RGB codes use hexadecimal numbering system.

7) For Red color, RGB code is # FFOOOO, for Blue color RGB code is # OOOOFF and for green
color, RGB code is # OOFFOO.

8) Yellow is the combination of maximum red and maximum green. Hence, RGB code of
yellow is #FFFFOO.

9) Similarly, RGB code for Black color is # OOOOOO and RGB code for White is # FFFFFF.

Q. 19 What is <IMG> tag ? What are the attributes


that can be used with <IMG> tag ?
Asked in Board Exam (Oct.2002) Important
Ans :
1) <IMG> is image tag. Its purpose is to include graphic images in the body of the web pages

2) There are two types of images :

i) Inline images : It occur in the middle of a line of text. If a image is large one, then the line
becomes very tall.

ii) Floating images : It cause text to wrap around the image. The paragraph will flow around
the image for several lines, if the image is large.

3) To make an image as a separate paragraphs, it is enclosed within paragraph element

HTML
e.g (1) :
<P>
<IMG SRC = "C : \My Documents \Lion.jpg" />
</P>

Or

You you can also write this

e.g (2) :
<P>
<IMG SRC = "https://source.unsplash.com/200x200/?computer" />
</P>

4) Generally SRC and ALT attribute are always used with <IMG> tag. SRC attribute includes
appropriate path of image file for searching. For any browser, that is not displaying images the
alternate text contained inside the ALT attribute is displayed instead of images.

e.g

HTML
<IMG SRC ="https://source.unsplash.com/200x200/?tree" ALT = "Tree">

5) In addition attribute and sizing attribute are used with <IMG> tag as.
a) For Inline images, alignment attribute has three attribute values that, are ALIGN =”TOP”,
ALIGN = “Middle” and ALIGN = “Bottom”

b) For Floating images there are two attribute values which are ALIGN = “LEFT” and ALGIN =
“RIGHT”

6) To indicate exact size of image use WIDTH and HEIGHT attributes.

HTML
<IMG SRC = "https://source.unsplash.com/800x600/?water" WIDTH = "200" HEIGHT = "200">

7) Display image with border using BORDER attribute.


e.g : BORDER = “1” then thin border will appear around the image.

Q. 20 What is <TABLE> tag ? What are the


attributes that can be used with <TABLE> tag ?
Ans :
1) A table can be created using <TABLE> …… </TABLE>
2) A table consists of rows and columns (also called as cells.)
3) The row is to be defined first and then cells or columns are inserted into the row from left
to right.
4) The row is created using <TR> …. </TR> tag while the cells can be inserted in the row using
<TH> …. </TH> or <TD> …. </TD> tags.
5) Normally <TH> tag is used just to give the heading or title to the column or row or both.
6) <TD> is used for displaying actual data. Structure of a simple table is given below :
Name of the
Description
Attribute Example

Draw an outline around table row and cell. By


1. Border <Table border = “2” >
default table has no border.

<Table width = “50” > absolute value in


Defines how wide your table will appear across
2. Width pixels <Table width = “80%”>
the width of the screen
percentage value of document width.

Decides the amount of spacing between each cell


3. Cellpadding <table cellpadding = “2” border = “2”>
border and the actual content of cell.

4. Cellspacing Creates space between the cells. <table border = “4” cellspacing = “4″>

5. Bgcolor To give the background color to the table <table border = “4″ bgcolor = “red’”>

<table border = “4” bgcolor = “red”


6. Bordercolor Give the color to the border
bordercolor = “black”>

7. Align Decides the alignment of the table. Default is left. <table align = “center”>

Attributes of tags as follows :

Attribute Description Example

Specifies the horizontal alignment of row or column. <tr align = “center”>


1. Align
Default alignment is left. <td align = “right’>>

Specifies the vertical alignment of row or column. <tr valign = “center”>>


2. Valign
Default alignment is left. <td valign = “right’>>

<tr bgcolor = “aqua”>>


3. Bgcolor Specifies background color of specific row or column.
<td bgcolor = “brown’>

Attributes of table cell only as follows :

1. colspan Number of columns that a cell spans. <td colspan = “2”>


2. rowspan Number of rows that a cell spans. <td rowspan = “2”>

Q. 21 Explain the use of following tags in HTML.


1. <CAPTION> tag
2. <TR> tag
3. <TH> tag
4. <TD> tag
Ans :

1) <CAPTION> tag :

1) <CAPTION> tag is used to create a caption on top of or below the table.

2) It requires <CAPTION> start </CAPTION> tag and end tag.

3) It can be used with ALIGN attribute by setting it to TOP or BOTTOM.

4) Caption is displayed outside the table’s border.

HTML
e.g. <TABLE>
<CAPTION ALIGN = "TOP">
Yesterday's Weather
</CAPTION>
</TABLE>

2) <TR> tag:

(March 2005)

1) <TR> is table row tag. The start tag is and end tag is <TR> and tag is </TR>

2) It creates a horizontal row of cells and contains table headings or table data.

3) Each use of a table row element (tag) begins a new table row.

4) A row must contain atleast one table data element or table heading element.

5) It includes attributes like ALIGN, BGCOLOR and VALIGN.


3) <TH> tag:

(Mar 2013)

1) <TH> is table heading tag. The start tag is <TH> and the end tag is <TH>.

2) This tag is used to represent individual column heading of a table.

3) By defult text in this cell is bold and centered.

4) It has ALIGN, VALIGN, CELLSPACING, CELLPADDING etc. attribute to set the heading content
(LEFT, RIGHT, CENTER)

4) <TD> tag :

1) <TD> is table data tag. The start tag is and the end tag is <TD> and the end tag is </TD> .

2) <TD> creates each individual cell.

3) The number of cells in a row determines the number of columns.

4) It includes ALIGN, VALIGN, CELLSPACING, CELLPADDING etc. attribute.

5) By default text in this cell is aligned left and centered vertically.

Q. 22 What are COLSPAN and ROWSPAN attributes


?
Ans :

1) COLSPAN and ROWSPAN are special attributes that can be used with<TH> and <TD> tags.

2) There may be some situation, in which one cell of table to span more than one row or
column. For such situations, COLSPAN and ROWSPAN attributes may be used.

3) The COLSPAN attribute can be used to make cell contents merge with another cell.

eg.

<TD COLSPAN = “2’>


<TH COLSPAN = “2”>

This spans two columns.


4) The ROWSPAN specifies how many rows a cell should take up.

e.g.

<TD ROWSPAN = “2">

<TH ROWSPAN = “2”>

Q. 23) List any three types of hyperlinks with


suitable example.
(March 2003)

Ans :

1) In HTML, link is created to jump from one document to other, or image or any local or Web
pages by using special tag ie. <A> anchor tag. </A>

Syntax : <A HREF="URL"> name or image which can be treated as link . </A>

There are following types of hyperlinks

a) Link to page on the World Wide Web :


e.g. <A HREF=”http://www.yahoo.com” Enter your name </A>
The string ‘Enter your name’ is a hypertext link to the website indicated by URL Specific

b) Link to a image by image as a link.:


e.g. <A HREF = “img.jpg”> <IMG SRC=”img2.jpg”></A>
The image img.gif is a hypertext link to the image file img2.jpg.

c) Link to document located in different directory :


e.g. <A HREF=”d:\ power \ab.html” Click Here </A>

Here by clicking on Click Here link, destination page i.e. ab.html will be displayed which ;
specified in the path given.
Q. 24 What is script ? Explain VB script. Give one
example.
Ans :

1) A script means a series of commands that will be executed by host environment (or server).

2) Scripting enables us to set and store variables, performs operations on variables.

3) By integrating script, make static HTML page active or dynamic, so that it is called as DHTML
ie. dynamic hyper text markup language.

4) Scripting languages are special programming languages. These are used on web page to
control different elements of the page including controls frames and browser interface.

5) There are two famous scripting languages :


1) VB Script
2) Java Script

6) VB Script allows web author to write small scripts, that will be executed on users browsers
rather than on the servers.

e.g. An application collects data from a form and then sends it to the server. If it can validate
the data for completeness and correctness before sending it to the server, it will greatly
improve the performance of browsing section. Since data is sent to server only if it is verified
as correct.

7) Another imortance of VB Script is increased functionality introduced to the web authors if


the form of applet, plugs-in, Active (x)-control and objects. Each of these things can be used to
add extra functions and interactivity to the web page.

HTML
<HTML>
<HEAD>
<TITLE>HELLO WORLD</TITLE>
<SCRIPT LANGUAGE="VBSCRIPT">
SUB can()
Msgbox "HELLO WORLD"
END SUB
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="FORM1">
<INPUT TYPE="BUTTON" NAME="B1" VALUE="CLICK" ONCLICK="can()">
</FORM>
</BODY>
</HTML>
Q. 26 Give the advantages (features) of VBScript.
Ans :
(i) VBScript designed to be fast :
VB Script does not support any strict data type (i.e. integer, character, float etc.). The only
data type available is varient. It is a special all purpose data type, which can be used to store
any kind of data.

(ii) VB Script is safe :


It provides file system components which consists of objects, which can be used to perform
I/O. But, all language features that enable access to local files on which application is running
has been removed from VB script to enhance the security.

(iii) Rich set of functions :


VB Script provides with rich set of functions for performing various types of operations via
array, manipulating functions, data and time functions, string functions, mathematical
functions, conversion functions.

(iv) Error handling :


VB Script allows user to access s and handle errors through the use of Err object.

Q. 27 What are the limitations of VB Script ?


Ans :
i) Array handling : All VB Script arrays are zero based. It does not allow user to change the
base of an array variable for specific implementation.

e.g. If we want to create array of top ten students in a class, it would make Sense to to state
array from 1. But we must start array from zero.

ii) VB Script cannot create user defined data type : VB Script p reviges ee Sesser Object and
collections, but does not give provision for a user to teat user defined data type.

(iii) Dynamic data exchange (D.D.E.) : Is not supported in VB Script, as it may violet the
intergit of server.
Q. 28 Write HTML code to create a birthday card.
The card must have appropriate message an link
to www.archiesonline.com
HTML
<!DOCTYPE html>
<html>

<head>
<title>BIRTHDAY CARD</title>
</head>

<body bgcolor="AQUA" text="MAROON">


<center>
<h2><u>ON YOUR BIRTHDAY <br> WITH LOTS OF LOVE</u></h2>
<font face="BOOKMAN OLD STYLE" size="+5">
<em>
Smiling Eyes <br>
Warm Hearts, Loving Thoughts, <br>
Beautiful Moments <br>
Special Wishes... <br>
Are all about one person, one day <br>
One occasion <br>
<b>You and your Birthday </b><br>
<h2>Have A Good Time!</h2>
</em>
<strong>
<br> Wish You a <br>
<h1>
<a href="http://www.archisonline.com">HAPPY BIRTHDAY</a>
</h1>
</strong>
</font>
</center>
</body>

</html>

Q.29 Write an appropriate HTML code to display


the following.
HTML
<!DOCTYPE html>
<html>

<head>
<title>C++ Data types</title>
</head>

<body>
<h2 align="center">
C++ Data types
</h2>
<ol type="1">
<li> Built in
<ol type="1">
<li> Integral
<ol type="1">
<li> Integer </li>
<li> Char </li>
</ol>
</li>
<li> Floating
<ol type="1">
<li> Float </li>
<li> Double </li>
</ol>
</li>
<li> Void </li>
</ol>
</li>
<li> User defined
<ol type="1">
<li> Structure </li>
<li> Class </li>
<li> Union </li>
<li> Enumeration </li>
</ol>
</li>
<li> Derived
<ol type="1">
<li> Arrays </li>
<li> Functions </li>
<li> Pointers </li>
</ol>
</li>
</ol>
</body>

</html>

Q.30 Write a HTML cade for following.

Ans : HTML code for A.HTML files is as follows :

HTML
<!DOCTYPE html>
<html>

<head>
<title>A-HTML</title>
</head>
<body>
<table border="3">
<caption align="top">
CRICKET ANALYSIS
</caption>
<tr>
<th>COUNTRY</th>
<th>PLAYED</th>
<th>WON</th>
<th>LOSE</th>
</tr>
<tr>
<td><a href="B.HTML">INDIA</a></td>
<td>30</td>
<td>23</td>
<td>07</td>
</tr>
<tr>
<td><a href="B.HTML">AUS</a></td>
<td>24</td>
<td>19</td>
<td>05</td>
</tr>
<tr>
<td><a href="B.HTML">PAK</a></td>
<td>18</td>
<td>02</td>
<td>16</td>
</tr>
<tr>
<td><a href="B.HTML">ZIM</a></td>
<td>10</td>
<td>07</td>
<td>03</td>
</tr>
</table>
</body>

</html>

Q.31 Write a HTML code for a web page displaying


the following.

Ans: HTML code is as follows :


HTML
<HTML>

<HEAD>
<TITLE> COURSES IN COMPUTER SCIENCE
</TITLE>
</HEAD>

<BODY>
<TABLE BORDER="1">
<TR>
<TH COLSPAN="2">
YESHWANT COLLEGE, NANDED
</TH>
</TR>
<TR>
<TH> Course </TH>
<TH> Capacity </TH>
</TR>
<TR>
<TD> B.Sc (comp) </TD>
<TD> 80 </TD>
</TR>
<TR>
<TD> B.Sc (C.A.) </TD>
<TD> 80 </TD>.
</TR>
<TR>
<TD> M.Sc (comp) </TD>
<TD> 30 </TD>
</TR>
<TR>
<TD> M.C.M. </TD>
<TD> 40 </TD>
</TR>
</TABLE>
</BODY>

</HTML>

Q.32 Write a HTML code to display the following :

Ans. : HTML code is as follows :

HTML
<!DOCTYPE html>
<html>

<head>
<title>Merks list</title>
</head>

<body>
<table border="2">
<tr>
<th rowspan="2">Sr. No.</th>
<th rowspan="2">Student<br>Name</th>
<th colspan="3">Marks Obtained</th>
<th rowspan="2">Total</th>
</tr>
<tr>
<th>Test 1</th>
<th>Test 2</th>
<th>Test 3</th>
</tr>
<tr>
<td>1</td>
<td>Maheshwari</td>
<td>150</td>
<td>150</td>
<td>150</td>
<td>450</td>
</tr>
<tr>
<td>2</td>
<td>Akanksha</td>
<td>129</td>
<td>130</td>
<td>131</td>
<td>390</td>
</tr>
<tr>
<td>3</td>
<td>Asma</td>
<td>125</td>
<td>115</td>
<td>120</td>
<td>360</td>
</tr>
</table>
</body>

</html>

Q.33 Write a HTML code for displaying a six-celled


table.

HTML
<!DOCTYPE html>
<html>

<head>
<title>Celled Table</title>
</head>
<body>
<table border="3" cellspacing="50">
<tr>
<td>Sunday</td>
<td>Monday</td>
<td>Tuesday</td>
</tr>
<tr>
<td>First</td>
<td>Second</td>
<td>Third</td>
</tr>
</table>
</body>

</html>

Q.34 write HTML code for the following :

Asked in Board Exam (March 2002) Important

HTML
<!DOCTYPE html>
<html>

<head>
<title>Sales Analysis</title>
</head>

<body>
<table border="5" width="100%" cellspacing="0">
<tr>
<td width="40%" colspan="2" rowspan="2"></td>
<td width="60%" colspan="3" align="center">
<b>YEAR</b>
</td>
</tr>
<tr>
<td width="20%" align="center">
<b>1998</b>
</td>
<td width="20%" align="center">
<b>1999</b>
</td>
<td width="20%" align="center">
<b>2000</b>
</td>
</tr>
<tr>
<td width="20%" rowspan="2" align="center">
<b>Sales</b>
</td>
<td width="20%" align="center">
<b>Units</b>
</td>
<td width="20%" align="center">
500
</td>
<td width="20%" align="center">
400
</td>
<td width="20%" align="center">
100
</td>
</tr>
<tr>
<td width="20%" align="center">
<b>Income</b>
</td>
<td width="20%" align="center">
1000
</td>
<td width="20%" align="center">
800
</td>
<td width="20%" align="center">
2000
</td>
</tr>
</table>
</body>

</html>

Q.35 Write a HTML code for a web page displaying


local time and day. Make use of VB Script
HTML
<!DOCTYPE html>
<html>

<head>
<title>Local time and day</title>
</head>

<body>
<h1>Local time is ..</h1>
<hr>
The local time is now
<script language="VBScript">
document.write(Time() + " on " + MonthName(Month(Now), false) + " " + Day(Now) + ", " + Year(Now));
</script>
</body>

</html>
Q. 37 Write the extract output of the following
HTML code with font specifications in brackets :
<body>

<h1>LIST OF BOOKS</h1>

<hr>

<ul type="circle">

<li>How to Solve It By Computer</li>

<li>HTML in Easy Steps</li>

<li>C++ Programming</li>

</ul>

<ol type="A">

<li>Microprocessor Programming</li>

<li>Networking Essentials</li>

<li>Microcontrollers</li>

</ol>

</body>

Ans. : Output is as follows with font specifications in brackets :

LIST OF BOOKS ⬅ (Text size h1 default font is used)

 How to solve it By computer


 HTML in Easy Steps
 C++ Programming
(Text size is default, Regular default font is Used)
 Microprocessor Programming
 Networking Essentials
 Microcontrollers.
(Text size iS default,Regular default font is used)
Q.38 Write HTML code for a webpage displaying
the following table.
Asked in Board Exam (Oct 2002) Important

Ans. : HTML code is as follows :

HTML
<HTML>

<HEAD>
<TITLE>Weather Table</TITLE>
</HEAD>

<BODY>
<TABLE BORDER=2>
<CAPTION>
Yesterday's Weather
</CAPTION>
<TR>
<TH>City</TH>
<TH>High</TH>
<TH>Low</TH>
<TH>Wind</TH>
</TR>
<TR>
<TD>Mumbai</TD>
<TD>33</TD>
<TD>24</TD>
<TD>West</TD>
</TR>
<TR>
<TD>Pune </TD>
<TD>34</TD>
<TD>25</TD>
<TD>South</TD>
</TR>
<TR>
<TD>Latur</TD>
<TD>32</TD>
<TD>20</TD>
<TD>South</TD>
</TR>
</TABLE>
</BODY>

</HTML>

Q. 39 Write the exact output for the following code


with font specifications in brackets.
<html>

<head>

<title>Introduction</title>

</head>

<body>

<h2><b>Terms in Computer</b></h2>

<dl>

<dt>Software</dt>

<dd><b>Software</b> is a set of programs which are required to run the system.</dd>

<dt>Hardware</dt>

<dd>The electronic components used in the computer system are called <b>Hardware</b></dd>

</dl>

</body>

</html>

Ans : Output is as follows with font specifications in bracket :

Introduction ← Title of the page is Introduction

Terms in Computer : ← (Text size in h2, bold, default font is used)

Software :

Software is a set of programs which is required to run the system. ← (Text size default
regular font is used)

Hardware :

The Electronic component used in the computer used in the computer system is called
as Hardware.
Q.40 Write the exact output of the following HTML
code with font specification in brackets:
Asked in Board Exam (October 2003) Important
<html>

<title>Introduction</title>

<body>

<h1> <b> COMPUTER SCIENCE </b> </h1>

<hr>

<u> SCHAUM'S OUTLINE SERIE iS</u>

<hr>

<h5> SEYMOUR LIPSCHUTZ </h5>

</body>

</html>

Ans: Introduction ← (Title of the page)

COMPUTER SCIENCE ← (text size h1 in bold, Default font is used)

SCHAUM’S OUTLINE SERIES ← (text size is default, Regular, Default font is used)

SEYMOUR LIPSCHUTZ ← (text size h5, Regular, Default font is used)


Q 41. HTML code for the following :
Asked in Board Exam (Mar.07, Oct. 2003) Important

Ans : HTML code is as follows :

HTML
<!DOCTYPE html>
<html>

<body>
<table border="1" cellpadding="20" cellspacing="10">
<tr>
<th colspan="3" align="center">SCIENCE</th>
</tr>
<tr>
<td>FY BSc</td>
<td>SY BSc</td>
<td>TY BSc</td>
</tr>
<tr>
<td align="center">300</td>
<td align="center">100</td>
<td align="center">25</td>
</tr>
<tr>
<th colspan="3">ARTS</th>
</tr>
<tr>
<th>FY BA</th>
<th>SY BA</th>
<th>TY BA</th>
</tr>
<tr>
<td align="center">200</td>
<td align="center">150</td>
<td align="center">40</td>
</tr>
<tr>
<th colspan="3">COMMERCE</th>
</tr>
<tr>
<th>FY BCom</th>
<th>SY BCom</th>
<th>TY BCom</th>
</tr>
<tr>
<td align="center">100</td>
<td align="center">70</td>
<td align="center">50</td>
</tr>
</table>
</body>

</html>

Q.42 Write the HTML code for the following table :


Asked in Board Exam (March 2004) Important

Ans.: The HTML code are as follows :

HTML
<!DOCTYPE html>
<html>

<head>
<title>Sales and Income Data</title>
</head>

<body>
<table border="1" cellpadding="20">
<tr>
<th rowspan="2" colspan="2"></th>
<th colspan="3">Year</th>
</tr>
<tr>
<th>1999</th>
<th>2000</th>
<th>2001</th>
</tr>
<tr>
<th rowspan="2">Sales</th>
<th>Units</th>
<td>300</td>
<td>750</td>
<td>1,200</td>
</tr>
<tr>
<th>Income</th>
<td>Rs. 3,000</td>
<td>Rs. 7,500</td>
<td>Rs. 12,000</td>
</tr>
</table>
</body>

</html>
Q.44 Write the exact output for the following code
Asked in Board Exam (Oct. 2004) Important
<html>

<head>

<title> computer shop </title>

</head>

<body>

<h3> <b> Title : XYZ Computers Ltd, </b> </h3>

<p> Address ; Shakti Complex, Aurangabad </p>

<h1> <i> Dealers in : all types of peripherals </i> </h1>

</body>

</html>

Ans: Output is as follows with font and RGB colors specification in bracket :

COMPUTER SHOP ← (Title of the page)

Title : XYZ Computers Ltd. ← (Text size in h3, bold. Default font is used default text color)

Address : Shakti Complex, Aurgangabad. ← (Text size is default, regular, Default font is used.
Default text color)

Dealers in : all types of peripherals. ← (Text size in h1, italic, Default font is used, Default text
colour)

Q.45 Write HTML code for displaying a Web Page


containing a six-celled table as shown below
Asked in Board Exam (Oct. 2004) Important
Ans.: HTML code is as follows :

HTML
<HTML>

<HEAD>
<TITLE> Celled Table </TITLE>
</HEAD>

<BODY>
<TABLE BORDER=2 CELLSPACING=50>
<TR>
<TD> Sachine </TD>
<TD> Saurav </TD>
<TD> Laxman </TD>
</TR>
<TR>
<TD> First </TD>
<TD> Second </TD>
<TD> Third </TD>
</TR>
</TABLE>
</BODY>

</HTML>

Q.46 Write the exact output of the following HTML


code with font specifications in bracket
Asked in Board Exam (March 2005) Important
<html>

<body>

<hl align=“center”> LIST OF TOPICS </h1> <hr>

<ol>

<li>

<p align=“left”> Operating systems </p>

<li>

<p align=“left”> Data structures </p>


<li>

<p align=“left”> C++ programming </p>

<li>

<p align=“left”> HTML </p>

</ol>

<hr noshade>

<ol>

<li>

<p align=“center”> COMPUTER SCIENCE </p>

</ol>

<hr>

</body>

</html>

Ans :

LIST OF TOPICS ← (Text size in H1, regular, default font is used)

↑ (Horizontal line with default width)

1. Operating systems
2. Data Structurs ← (Textsize regular, default font is used)
3. C++ programming
4. HTML
↑ (Horizontal line with default width)

1. COMPUTER SCIENCE ← (Textsize regular, default font is used)

↑ (Horizontal line with default width)

Q.47 Write HTML code for the following :


Asked in Board Exam (March 2005, 2011) Important

HTML
<!DOCTYPE html>
<html>

<head>
<title>COMPUTER PAPER ANALYSIS</title>
</head>

<body>
<table border="2" width="100%" cellspacing="15">
<tr>
<td width="25%" rowspan="2" align="center">
COMPUTER <br> SCIENCE
</td>
<td width="25%" align="center">
PAPER - I
</td>
<td width="25%" align="center">
PAPER - II
</td>
<td width="25%" align="center">
TOTAL
</td>
</tr>
<tr>
<td width="25%" align="center">
100
</td>
<td width="25%" align="center">
100
</td>
<td width="25%" align="center">
200
</td>
</tr>
</table>
</body>
</html>

You might also like