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

HTML TPS

The document provides a comprehensive overview of HTML, including its definition, features, advantages, and disadvantages. It covers various HTML tags and their purposes, such as <P>, <BR>, <HR>, and <PRE>, along with examples of how to use them. Additionally, it explains the structure of an HTML document and the differences between various tags like <B>, <I>, <EM>, and <STRONG>.

Uploaded by

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

HTML TPS

The document provides a comprehensive overview of HTML, including its definition, features, advantages, and disadvantages. It covers various HTML tags and their purposes, such as <P>, <BR>, <HR>, and <PRE>, along with examples of how to use them. Additionally, it explains the structure of an HTML document and the differences between various tags like <B>, <I>, <EM>, and <STRONG>.

Uploaded by

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

Chapter HTML

Scope of the Sylabus Probable marks:14


Introduetion to HTML.
Why HTML?Its advantages and drawbacks.
Study of tags : <HTML>, <HEAD>, <TITLE>,
<BODY>, <P>, <BR>, <UL>, <OL>, <PRE>, <MARQUEE>
Font styles
<B>, <>, <U>, <BIG>, <SMALL>, <SUB>, <SUP>, <FONT>.
Image
HREF,HR, <IMG>, SRC,ALI, HEIGHT, WIDTH, ALIGN
Tables
<TABLE>,<CAPTIONS>, <TR>, <TH>,<TD>
Use of scripting as a language support.
Note: Only VBscript using for....next, If ...then, MsgBox, InBox, DIM, SET.

INTRODUCTION TO HTML

Q.1 What is HTML ? (Oct. 2002,03 ; Mar. 2006,09,14, Dec. 2020


Ans. : H23
1) It is the most simple, text oriented programming language.
2 HTML stands for HyperText Mark-up Languag 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 or Internet Explorer.
4) Hypertextis 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 essentially a set of instructions to web browser for formatting and layout of
web pages.
9) HTML is not a programming language in real sense.
Science - J
TPSComputer 4-2 HTML

Q2 Explain features of HTML. (March 2003)


Ans. :
() Hypertext Markup Language or HTML is a set of codes that is used to create document
RAthen it can be published on the
HTML lets user jnp
World Wide Web.
(2) from topic rather than finding and reading information linearly.
(3 Documents prepared in HTML include reference graphics and
4 HIML is hyperlink specification language. formatting tags.
(5) HTML supports to frames including target windows and
It contains powertul borderless frames.
(6 formatting facilities for
It defines the syntax and placement of special text, page, images etc.
displayed by the browser but it tells the' browserembedded directions which are not
how to display the contents OI Tie
document.
(8) It supports for .BMP and
animated.GIF images.
HTML Support torms which make it possible to create
process uses input. documents that collect and
n0) It tells how to make a document
interactive through special hypertext links.
WHY HTML ? ADVANTAGES AND
DISADVANTAGES
Q.3 What are advantages of HTML ?
(Oct. 2002,03,09, 14; March 06,09,14, 19, July 2017, Dec. 202
Ans.: The advantages of HTML are as enlisted below: H23,24
1) For creating HTML document, only text editor is needed. No special
2 HTML document can be created on any hardware
software is needed.
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 facility is available.
7) Independent work can be doneand need not to worry about editing programs.
8) lf 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
upgrades to purchase.
)Learning HTML issimple than arny programming language.
0.4 Give the disadvantages of HTML.
(Oct. 2002,03,14; March 2006,09, 19, July 2017, Dec. 2020
Ans. : W24
HIML is not a programming language in true sense.
ny Simple calculation cannot be done in HTML.
3) lt cannot be used to display even date.
4 The interactive web pages s cannot be built by HTML.
5)
6
The web pages developed in HTML cannot behave like an application.
eweb pages developed in HTML do not have their own interface.
)
Hyperlink is provided in HTML. But for that we need atrip to server at each step.
I
4-3
HTML
TPS Computer Science -
STUDY OF TAGS
are used for writing HTML
Name any two softwares that codes.
Q.5 What is HTML ?
advantage and one
disadvantage of HTML. (Oct. 2002
State any one
No. 1, 3 and 4.
Ans. : Please refer Q. writing HTML codes are:
Softwares that are used for
Windows
(1)Notepad in
Macintosh
(2) Simple Text in
(3)Pico in Unix
Q.6 What are tags ? Explain.
symbols defined in HTML to have special
Ans. :
a single unit of mark-up. It is a set of
1) Atag is writtern directly into text edition.
meaning.Tags are instructions that are
a keyword and end with greater than (>)
Tags start with a less than sign (<) followed bybrackets.
2)
sign. These symbols together known as angle
letter, that specify the type of effect.
3) The tag part is a code usually one or two
4) There are two types of tags in HTML:
(i) Start tags (ii) End tags
are used to end that effect. Name of
Start tags are used to begin an effect, and end tags
end tag is preceded by aforward
end tag is same as that of start tag but the name of
slash (/).
and end tag </b will be
5) For e.g. <0> is Italic tag. The text written between start tag (<I>)
displayed in italic.
<> HTML </>
Here, the word HTML' will be displayed in italics.
6) Tags can be nested within each other.
For eg. <B><> Hello </></B>
7) The attributes are inserted right within the tag that are used to affect tag's behaviour.
Q.7 Give the structure of HTML web page. (Oct.2011,14, March 2017, 2020
Ans.:
1) Every HTML documernt has the same general structure, and it consists of few tags that
define the page as a whole.
2) The primary part of an HTML dócument are denoted by <HTML>, <HEAD> and
<BODY> tags. Each of these tags are known as Document Structure Tags
3) HTML file always starts with <HTML> tag. Similarly ended with </HTML> tag. t
declares 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 actualy
appear on the web page.
Q.0. 13 Explain the following tags in HTML: (March 2007,11 ; Oct.
(i) <P> tag (ii) <BR> tag (iii) <HR> tag (iv) <PRE> 2005,06
Ans. : (i) <P> tag: (Oct. 2021
1) <P> tag is used for creating paragraph of text.
2) A paragaph can be created by enclosing text within paragraph codes <P an Q14

</P>. Ans.

3) The browser ignores the paragraph created by user while writing codes by Dressine
Enter'. User must specifically define a paragraph in the code by using a paragaph
tag.
4) The <P> tag has one optional attribute called align. It is used to specify where the
text appear on SCreen.
i) <P align = left> Left alignment like normal text.
(ii) <Palign = right>:Text is aligned toright margin, but not justifiedto left.
(ii) <P align = center> :Text is centered.
(iv) <P align = Justify>: Text is justified to left and right margin.
(ii) <BR> tag: (March 2012, 16, 22 ;Oct. 2002, 2004
1) <BR> tag insert line break into a text flow. H23 24
2) It tells the browser to wrap the text that follows onto a new line without inserting
any extraspace between the lines. Q15
3) e.g.Sonia Gandhi, <BR> 10 Janpath, <BR> New Delhi.
In above example, the matter will be displayed as: Ans.
Sonia Gandhi,
10 Janpath,
New Delhi
4) For an entire blank line <BR> tag on that line. For multiple blank lines, just
them and type <BR> tag on every expected blank count
(iii) <HR> tag : (Mar, 2016; Oct. 2006, July 2016
Please refer Q. 15(c), Ch. 4, Pg. 4-9. H23 4)
J
ComputerScience- 4-8 HTML
TPS
<PRE> tag : W2ó;
18 H24
The text2004,07,12,22
(iv) (1) <PRE, is used to preformat the text.(March appcaring between start tag July
:Oct. 2003,06,14; <PRE>
and end tag </1RE> is
displayed in mono space form.
(2) This tag is used toposition the characters.
(3) This tag displays the text in exactly same format as the character and line spacing
format detined in sOurce HTML document.
(4) For example:
<PRE>
1
1 1
1 2 1
1 3 3 1
</PRE>
The display will be as:
1
1 1
1 2 1
1 3 3 1
14 How text is formatted by using <B>, <> 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>, <> and <U> tags as :
<B> tag: H23(Mar. 2005)
<B> is bold tag. The text appearing between start tag (<B>) and end tag (</B>) will be
displayed in bold letters.
e.g. <B> Bold Text </B> ’ Output :Bold Text
(ü) <> tag : (Mar. 2013)
<> is italic tag. The text appearing between start tag (<I>) and end tag (</>) will be
displayed in italics.
e.g. <I> Italic Text </> ’ Output : Italic Text
(üi) <U> tag: H24 Oct. 2007, July 2016
<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.
e.g. <U> Underlined Text </U>. ’ Output:Underlined Text
Qi5 Explain the purpose of following tags in HTML with example.
(a) <marquee> (b) <LIb (c) <HR> (March 2002,04,08; July 2019
Ans. : (a) <marquee>: (Oct: 2002,14)
) lt is used for scrolling the text and images on screen from right to left.
14) The text written between start tag <marquee> and end tag </marquee> will scroll on
screen, in horizontal line.
ror e-g. : <marquee> computer science </marquee>
screen.
Here, the word computer science will scroll on
There are several attributes associated with <marquee> such as BGCOLOR, HEIGHT
and WIDTH.
This is used to scroll the current news or position of different companies in stock
market.
TPS Computer Science -I 4-9 HTML

(b) <LI> (March 2013


A tag <LI> is uSed to indicate actual list elements.. It is used inside <UL> and <OL tae
to show unordered and ordered list element.
Example :
Input Output
<ULS
<LI> Prinary Primary
<U> Seondary Secondary
<LI> Higher secondary Higher secondary
</UL>
(c) <HR>: (March 16; Oct. 06,21,July 2016
(1) <HR> tag is horizontal rule tag, also called as horizontal line.
(2) Aweb page can be divided into separate sections by using horizontalrule <HR> tag
(3) This tag is mostly used for decorative purposes.
(4) <HR> tag takes several attritbutes such as COLOR, SIZE,WIDTH align etc.
e.g. :<HR SIZE = "6" WIDHT= "60%" align = "right">
This displays a line of six pixels thick that spans 60 percent of the browser's window and
right aligned.
(5) Thedefault align is to center in the window.
ex-< HR NO SHADE> This means for an unshaded horizontal line.
Q. 16 What is <EM> tag ? What is the difference between <EM> tag and <I> tag ?
(March 2015, July 2018
Ans. :
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 <> tag is that text to speech browsers gives
spoken emphasis to the text within emphasis tags, while no such emphasis is given to
text within italic tags.
For e.g. <P> you <EM> must </EM> handover the money to him</P>.
Q. 17 What is <STRONG> tag? What is the difference between <STRONG> and <B>
tags?
Ans. :
1) <STRONG> is strong tag. The text appearing between _tart tag (<STRONG>) and end
tag (</STRONG>) willbe 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 readers
gives strident pronunciation to the strong text, while no such strident pronunciation is
given to bold text.
For eg. <P> If they don't give me that raise <STRONG> tomorrow </STRONG>, I quit
</P>.
Q. 18 What are types of List? Explain with example?
OR
J22
Explain <OL> and <UL> tag used in HTML with example. (March 2018)
Ans.: There are three main types of list - unordered list, ordered list and definition list.
Different list types are :
<OL> Ordered list
TPS Computer Science - 1 4-13 HTML
4) This link is clickable in a graphical browser.
different colour and
5) With most browsers, the text within these tags is displayed in a
underlined.
<A HREF= "http:\\www.rosecards.com">
eg.
More Cards </A>
HREF attribute. HREE
6) The object to which the link has to be made is defined by the
of the
refers to hypertext reference. It defines URL (Uniform Resource Locator)
destination of anchor.
(March'2004, 08, 12, 22;Oct. 2004, 05, 07;July 201
2) <SUB> tag :
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.
e.g. H<SUB> 2 </SUB> 0
It willbe displayed as : H,0
(March 2004, 2005; Oct.2010; July 2018
3) <SUP> tag: H23
1) <SUP> is superscript tag. displayed in
2) The text enclosed within start tag (<SUP>) and end tag (</SUP>) will be
superscript form.
3) It is abit higher than the normal text.
4) It isuseful for mathematical formulae.
e.g. E = mc<SUP> 2 </SUP>
It will be displayed as:
E = me²
(Oct. 2015
4) <Font> tag :
1) <FONT> is font tag.
enclosed text.
2) It is used to format the size, type face and colour of
attributes:SIZE, FACE and COLOR.
3) The <FONT> tag can be used with three different
values ranging from 1 to 7.
4) The SIZE attribute can be specified in absolute or relative
sign before the number will
Using a relative font size ie. by putting plus or minus
change the font size relative to th default size.
5) The COLOR attribute isspecified with a RGBcode or specify a color name.
the text enclosed by the font
6) The FACE attribute specifies a type face that is used for
element.
(Oct.2010}
5) <BIG> tag :
1) <BIG> is big tag.
tag (</BIG>) is displayed in
2) The text enclosed within starting tag (<BIG>) and ending
larger font.
SIZE = "+1">.
3) <BIG> tag has the same effect as <FONT
4) Ifalready the size is largest, tag is ignored.
4-81 HTML
TPS Computer Science - I
tag (iv) <TABLE>
(Oct. 2014
In HTML
isnot apaired
(ii) <BR>
22. (ii) <>
(i) <B>
Ans. : (iii)<BR> (iv) HEIGHT
(March 2015
<A> is
23. The valid attribute of(ii)SRC (iii) BGCOLOR
(i) NAME
change, Bullets of the Iist
Ans. : (i)NAME HTML is use to
attribute of <OL> of (ii) BULLETS (iv) TYPE (Oct.2015
24. The (ii) VALUE
(i) START
Ans.: (iv) TYPE (July 2016)
25. The size of GIF format
file is
(i) Less than BMP format file
(i) Greater than BMP format
file
(iv) Greater than JPEG format file
file
(iii) Equal to BMP format file
format
Ans. : (ii) Less than BMP <TABLE> tag has the default value of
26. Theattribute BORDER in (July 2017
these
None of
(i) 2 (ii) 0 (iü) 1 (iv)
Ans. : (iii) 1
code is
(March.2018
27. In HTML, for red colour, RGB (ii) #0Off00 (iv) #0000ff
() #000000 (i) #ffO000
Ans. : (ii)#ffO000 (July 2018
list.
28. tag is used to write the definition (iv) <DT>
(ii) <DL> (iii) <OL>
(1) <UL>
Ans. : (ii) <DL> (March 2019)
29. Bulleted list in HTML is created by tag.
(ii) <OL> (iii) <B> (iv) <BR>
(i) <UL>
Ans. : (i) <UL>
(March2020
30. tag is used tocreate a row in table.
(ii) <th> (iii) <tr> (iv) <tt>
(i) <td>
Ans. : (iii) <tr>
(Oct. 2011)
31. tag is use for subscript in HTML code.
1) <sup> (ii) <subscript>
(iüi) <sub> (iv) <super>
Ans. : (iii) <sub>
32. HTML tag does not require end tag.
(i) <p> (i) <br> (iüi) <head> (iv) strong
Ans. : (ii) <br>
33. An attribute which defines URL of document to be linked in <A> tag is
(March 2022
() REF (ü) VREF (iii) HREF (iv) ALT
Ans. : (iii) HREF

You might also like