Chap : HTML
Scope of Syllabus :
1) Introduction to HTML . 2) Why HTML? Its advantages and drawbacks.
3) Study of tags :
<HTML> , <HEAD> , <TITLE> , <BODY> , <P> , <BR> , <UL>, <OL> , <PRE>
<MARQUEE> .
4) Font Style tags :
<B> , <I> , <U> , <BIG>, <SMALL> , <SUB>, <SUP> , <FONT>
5) Image tags :
HREF, <HR> , <IMG> SRC, ALT, HEIGHT, WIDTH, ALIGN
6) Table tags :
<TABLE> , <CAPTION>, <TR> , <TH> , <TD>
7) Use of scripting as a language support
Note : Only VB script using for---next, if---then, MsgBox, InBox, DIM, SET.
--------------------------------------------------------------------------------------------------------------
Topic Scope for HSC board examination with option : 14 Marks
1 Mark M.C.Q. = 01 = 1 X 1 = 01 3 Mark que = 01 = 3X1 = 03
5 HTML Program = 02 = 5 X 2 = 10 Marks
-------------------------------------------------------------------------------------------------------------
H.S.C. Board M.C.Q. Question Bank
1) To place the image into HTML file --------- attribute is used in <img> tag Oct 21
i) url ii) alt iii) src iv) href
2) ------- HTML tag does not require end tag. Dec 20
i) <p> ii) <br> iii) <head> iv) <strong>
3) ---- tag is used to create a row in table. Mar - 20
i) <td> ii) <th> iii) <tr> iv) <tt>
4) Border attribute is used in --- tag. Aug 19
i) <HTML> ii) <P> iii) <TABLE> iv) <TITLE>
5) Bulleted list in HTML is created by ----- tag. Mar 19
i) <UL> ii) <OL> iii) <B> iv) <BR>
6) ------ tag is used to write the definition list. Aug 18
i) < UL > ii) < DL > iii) < OL > iv) < DT >
7) In HTML for Red colour RGB code is ---- Mar 18
i) # 00 00 00 ii) # ff 00 00 iii) # 00 ff 00 iv) # 00 00 ff
8) The attribute BORDER in <TABLE> tag has the default value of ------- July 17
i) 2 ii) 0 iii) 1 iv) None of these
9) ----- tag is used to put a line break in HTML code. Mar 17
i) <HR> ii) <BR> iii) <P> iv) <LI>
10) The size of GIF format file is -------- . July 16
i) Greater than BMP format file ii) Less than BMP format file
iii) Equal to BMP format file iv) Greater than JPEG format file
11) BORDER is attribute used in --------- tag of HTML. Mar 16
i) <PRE> ii) <ADDRESS> iii) <TABLE> iv) <CAPTION>
1|Page Chap 4 HTML Computer Science (D9-1)
12) The valid attribute of <A> is ----- Mar 15
i) NAME ii) SRC iii) BGCOLOR iv) HEIGHT
13) The ------ attribute of <OL> of HTML is used to changed, bullets of the list. Oct 15
i) START ii) VALUE iii) BULLETS iv) TYPE
14) In HTML ------ is not a paired tag. Oct 14
i) < B > ii) < I > iii) < BR > iv) < TABLE >
15) --------- is not a tag in HTML. Oct 13
i) IMG ii) ALT iii) BIG iv) SMALL
16) Border Attribute is used in ----- tag. Mar 14
i) <HTML> ii) <P> iii)>TABLE> iv) <TITLE>
17) For given colour RGB codes is ----------- Oct 12 1
i) #FF 00 00 ii) #00 00 FF iii) #00 FF 00 iv) #00 FF FF
18) The long form of HTML is ------- Mar 13
i) Hyperlink Tag Markup Language ii) Hyper Text Markup Language
iii) Hypermedia Tag Markup Language iv) Hyperlink Text Markup Language
19) --------- tag is used to put a horizontal rule in HTML code. Mar 12
i) <HR> ii) <BR> iii) <P> iv) <TD>
20) ----- tag is used for subscript in HTML code. Oct 11
i) <SUP> ii) <Subscript> iii) <SUB> iv) <Super>
21) To take image into an HTML file --------- attribute is used in IMG tag. Mar 11
i) <URL> ii) <ALT> iii) <SRC> iv) <HREF>
22) ------- is a tag in HTML. Oct 10
i) ALT ii) SRC iii) IMG iv) ALIGN
23) ALIGN is not an attribute used with ------ tag. Mar 10
i) <BODY> ii) <HR> iii) <TR> iv) <TABLE>
24) To place the image into an HTML file ------ attribute is used in IMG tag.
a) <url> b) <alt> c) <src> d) <href> (Oct 2003,Mar2006,Mar2007)
25) VBScript can be executed in ---- web browser. (Mar2004)
a) Netscape navigator b) Internet Explorer c) Both d) none of these
26) HTML stands for ----- (Oct2004, Oct 2005)
a) Hypertext Markup Language b) Hightext Manipulation Language
c) Hypertext Manipulating Language d) Hightext Markup Language
27) The long form of SGML is ----------(Mar2005)
a) Standard Global Machine Language b) Special Global Markup Language
c) Symbolic Generalized Machine Language d) Standard Generalized Markup Language
28) ------ is name of the web browser. (Oct2006)
a) Embedded system b) Netscape navigator c) Oracle d) C++
29) COLSPAN attribute is used with ----- tag. (Oct2007)
a) <body> b) <html> c) <title> d) <table>
30) <A> tag has attribute ------ which defines URL of the document to be linked.(Mar 2008)
a) SRC b) HREF c) VREF d) REF
31) In HTML ------ attribute defines the name of the file in which the image is to be found.
(Oct2008)
a) ALIGN b) SIZE c) SRC d) BGCOLOR
2|Page Chap 4 HTML Computer Science (D9-1)
32) ------- tag is used to scroll the text. (Mar2009)
a) <STRIKE> b) <MARQUEE> c) <HR> d) none of these
33) In HTML -------- tag is used for super script. (Oct 2002,Oct 2009)
a) <S> b) <Super> c) <sup> d) <script>
34) The long form of HREF is -----------(Mar2002)
a) Horizontal reference b) Hypertext reference
c) Hyperlink reference d) Hypermedia reference
35) ---------- tag is used to put a line break in HTML code. (Mar2003)
a) <HR> b) <BR> c) <P> d) <TT>
3|Page Chap 4 HTML Computer Science (D9-1)
1) Write an exact output of the following HTML code with font specification in bracket :
Oct 21
<html> <body> <h1> LIST OF BOOKS </h1>
<hr> <ul type =”circle”> <li> How solve by computer </li>
<li> HTML in easy steps</li> <li> C++ programming</li> </ul>
<ol type =”A”> <li> Microprocessor Programming </li>
<li> Networking essential </li>
</ol> </body> </html>
2) Write a code in HTML for following table : Oct 21
Paper I Paper- II Total
Computer
Science
100 100 200
3) Write HTML code for following output : Dec 20
(A) 12th science subject groups
a. English
(1) Theory-80
(2) Practical-20
b. Second Language
(1) Theory - 80
(2) Practical-20
c. Biology / Computer
(1) Theory- 70 / Theory-100
(2) Practical-30 / Practical-100
(B) 12th maths/crop/geo
Engineering
OR Medical
4) Write the exact output of the following HTML code : Dec 20
<html> <body> <table border = “2”> <tr> <<th colspan = “2” > JEE main </tr>
<tr> <td rowspan = “3”> Science <td> Physics </tr> <tr> <td> Chemistry </tr>
<tr> <td> Maths </tr> <td colspan = “2” > Best Luck for exam
</tr> </table> </body> </html>
5) Write code in HTML for following table : Mar 20
Subject Paper-I Paper-II
Computer Theory 50 50
Science Practical 50 50
HSC Exam Scheme
4|Page Chap 4 HTML Computer Science (D9-1)
6) Write the exact output of the following HTML code with font Specification : Mar 20
<HTML> <BODY> <TABLE border = “3” cellspacing = “10”>
<TR> <TH colspan = “3”> STREAM </TH>
</TR>
<TR> <TD> <A href = “[Link]”> SCIENCE </A> </TD>
<TD> <A href = “[Link]”> COMMERCE</A> </TD>
<TD> <A href = “[Link]”> ARTS</A> </TD>
</TR> </TABLE> </BODY> </HTML>
7) Write the exact output of the following HTML code: Aug 19
<html> <head> <title> Match summary </title> </head>
<body>
<table border = “1” cellspacing = “15” cellpadding = “15” >
<tr> <th rowspan = “2”> IND <br> 335/4 </th>
<td>Virat </td> <td> 185 </td> </tr>
<tr>
<td>Sharma</td> <td>90</td> </tr>
<tr> <th rowspan = “2” >AUS <br> 280 </td>
<td> Warner</td> <td> 90 </td> </tr>
<tr>
<td> Smith </td> <td> 70 </td> </tr>
<tr> <td colspan = “3” > IND win By 055 Runs </td>
</tr> </table></body> </html>
8) Write the HTML code for following output : Aug 19
(1) Computer Science Theory
(i) Paper 1 – 50 Marks
(ii) Paper 2 – 50 Marks
(2) Computer Science Practical
(i) Paper 1 – 50 Marks
(ii) Paper 2 – 50 Marks
9) Write exact output of following HTML code : Mar 19
< HTML> <BODY> <OL START = “10”>
<LI> English <LI> Second language </OL>
<OL type = “a”>
<LI> Compulsory <LI> Optional </OL>
<UL type = “square”>
<LI> Science <LI> Arts <LI> Commerce </UL>
</BODY> </HTML>
5|Page Chap 4 HTML Computer Science (D9-1)
10) Write HTML code for the following output : Mar 19
MyPage X
-
HTML is a hypertext
Markup language. The basic language of HTML is ASCII code.
The start tag and end tag.
This is only text oriented language.
One
Two
1. One
2. Two
11) Write the exact output of the following HTML code : Aug 18
< HTML > < BODY >
<H1> < U > Services of Operating system < /U > </H1>
< UL type = “square” > < LI > Information Management </LI>
< UL type = “circle” > < LI > File system < / LI >
< OL > < LI > Tape based system < LI > Disk based system < /OL> < /UL >
< LI > Process Management </LI> < LI > Memory Management </LI>
</UL> </BODY> </HTML>
12) Write code in HTML for following table : Aug 18
RESULT
JEE CET
If any enquiry click here.
Hint :
i) JEE is link to open a webpage [Link].
ii) CET is link to open a webpage [Link].
iii) Click here is a link to open website [Link].
13) Write HTML code for following output : Mar 18
Cricket Analysis
Country Played Won Lose
INDIA 30 27 03
PAKISTAN 30 03 27
14) Write the output of the following HTML code : Mar 18
<html> <body>
<ul type=”circle”> <li>One <li>Two <li>Three
<ul type=”square”> <li>Monday <li>Tuesday <li>Wednesday
</ul> </ul> </body> </html>
6|Page Chap 4 HTML Computer Science (D9-1)
15) Write HTML code for the following output : July 17
World Cup T20
IND PAK
Group A
AUS ENG
WI NZ
Group B
SA SL
16) Write HTML code for the following output : July 17
Computer Science
Paper- I
i. C++ Language
ii. HTML
iii. OS
iv. DS
o Paper-II
1. Microprocessor
2. Microcontroller
3. X86 Processors
4. Networking
17) Write a code in HTML for following table : Mar 17
Paper I Paper- II Total
Computer
Science
100 100 200
18) Write the exact output of the following HTML code with font specification in bracket.
Mar 17
<html> <title> Introduction </title>
<body> <h1> <b> Computer Science </b> </h1>
<hr> <u> Paper-I </u>
<hr> <u> Paper-II </u>
</body> </html>
19) Write the exact output of the following HTML code with font specifications in brackets.
July 16
<html> <body><ul> <li> <i> This is in Italic form </i> </li>
<li> <u> This is underlined text </u> </li>
<li> <b> This is BOLD Text </b> </li>
<ul> <li>This is a List</li>
<li>ABC</li> <li>XYZ</li> </ul> </ul> </body> </html>
20) Write the HTML code for the following : July 16
TOTAL MARKS
THEORY PRACTICAL
100 100
7|Page Chap 4 HTML Computer Science (D9-1)
21) Write an HTML code for following: Mar 16
Students
Year
Boys Girls Total
2004 25 30 55
2005 80 25 105
Record
22) Write an HTML code for following output : Mar 16
(The words click here act or hyperlink to next page whose address is
“C:\MyDocuments\[Link]”).
COLLEGE h1 and center
Principal
Vice Principal
Professors
Non-teaching Staff
For more details click here
23) Write output for following HTML code: Oct 15
<html> <head> <title> ABC </title> </head>
<body> <hr> <center> COMPUTER SCIENCE </center>
<hr> <ol> <li> Operating System <li> Data Structure <li> C++ </ol> </hr>
</body> </html>
24) Write a HTML code to display following output: Oct 15
Tuesday
March
18
2006
Prev Next
25) Write output of the following HTML program : Mar 15
<HTML> <HEAD><TITLE>abc</TITLE></HEAD>
<BODY> <H1 align=”center”> KBC Restaurant </H1>
<TABLE border=2> <TR> <TH rowspan=”2”>
<FONT SIZE=”5”> Pawbhaji</FONT> </TH>
<TH>with cheese</TH> <TH>35</TR>
<TR><TH>without cheese <TH>25</TR></TABLE>
</BODY></HTML>
8|Page Chap 4 HTML Computer Science (D9-1)
26) Write a program in HTML for the following output : Mar 15
i. Arts
A. History
B. Geography
ii. Science
I. Computer Science
II. Physics
iii. Commerce
o English
o Account
27) Write HTML code to display following output: Oct 14
SHIVAJI COLLEGE PUNE
XI XII
Boys 15 20
Girls 20 15
28) Write a program in VB Script to print good morning or good evening or good afternoon
using if----else control and time ( ) function. Oct 14
29) Write exact output of the following HTML code with font specification in bracket :
Mar14
<HTML> <BODY>
<H2> My Country </H2>
<HR> <BR> <H1 align=”center”> INDIA </H1> <BR> <UL> IS <LI> GREAT
<LI> BEAUTIFUL <LI> LOVING
</UL>
Here people care for each other
</BODY> </HTML>
29) Write an HTML code to display the following table on webpage: Mar 14
Record
Students
Year
Boys Girls Total
2007 519 710 1229
2008 800 925 1725
30) Write the exact output of the following HTML code with font specifications in brackets:
Oct 13
<html> <body> <dl> <h2> <b> Terms related to computer </b> </h2>
<dl> <dt> Protocls <dd> <b> Protocols</b> are rules by which communicates
<dt> Byte <dd> < b> Byte </b> is a group of 8 bit <dl>
</body> </html>
9|Page Chap 4 HTML Computer Science (D9-1)
31) Write HTML code for the following table: Oct 13
Library Books
Reference Text Book
Section
2000 4000
32) Write exact output of the following HTML code with font specifications in brackets:
Mar13
<html> <body> <h1 align=”center”>HSC BOARD EXAM</h1>
<p align=”center”> <i> SUBJECT: COMPUTER SCIENCE</i> </p>
<p align=”center”> <b> THEORYAND PRACTICAL EXAMS</b> </p>
<p align=”center”> <u> TOTAL</u>200 ____ MARKS </p>
</body> </html>
33) Write HTML codes for the following: Mar 13
HTML COLOUR CODE
IN HEXA-DECIMAL
BLACK WHITE
#00 00 00 # FF FF FF
34) Write HTML code for a web page displaying of the following table: Oct 12
Year
2007 2008 2009
Units 1500 400 1200
Sales
Income 1000 900 3000
35) Write a HTML code to display the following output: Oct 12
List of Books -- (Text size h1, default font is used)
o How to solve it By Computer
o HTML in Easy steps
o C++ Programming
A. Microprocessor Programming Text size is default
B. Networking Essentials
C. Microcontrollers
36) Write exact output of the following HTML code with font specifications in brackets :
Mar12
<html> <head> <title> Computer Step </title> </head>
<body> <h2> <u> Title: Megastar Company Ltd. </u> </h2>
<p> Address : Surya Complex, Delhi </p>
<h4> <b> Deals In : </b> </h4>
<ul> <li>Software <li>Hardware <li>Peripherals </ul>
</body> </html>
10 | P a g e Chap 4 HTML Computer Science (D9-1)
37) Write HTML code for the following : Mar 12
Roll No. Name Marks Total
CS1 CS2
1 RINA 75 80 145
2 RONAK 80 90 170
3 TINA 70 85 155
38) Write the HTML code for the following : Oct 11
V.I.P. SALES
ERASER 5
PENCIL 7
STATIONARY
PEN 10
BOOK 22
TOTAL 44
39) Write HTML code to display the following nested list: Oct 11
o College
I. Arts
a. History
b. Politics
c. Languages
i. English
ii. Marathi
II. Science
a. Physics
b. Chemistry
c. Biology
III. Commerce
Accounts
40) Write a HTML code for the following output: Mar 11
COMPUTER DEVICES
INPUT DEVICES
1. Keyboard
2. Mouse
STORAGE DEVICES
1. Hard disk
2. Floppy Disk
3. Compact Disk
OUTPUT DEVICES
1. Screen
2. Printer
11 | P a g e Chap 4 HTML Computer Science (D9-1)
41) Write a HTML code for the following : Mar 11
Paper-I Paper-II Total
Computer
Science
100 100 200
42) Write exact output of the following HTML code with font specifications in brackets:
Oct10
<html> <body> <h1> Terms used in Networking </h1>
<hr> <ul type =”circle”> <li> Bandwidth <li> Attenuation
<li> Electromagnetic Interference </ul>
<ol type = “a”> <li> Topology <li> Ethernet <li> Protocol </ol>
</body> </html>
43) Write HTML code for the following : Oct10
XII RESULT - Text Size h1
STREAM
SCIENCE COMMERCE ART
SCIENCE is a link available where clicking on SCIENCE a web page file
“[Link]” should be invoked on clicking “COMMERCE” a web
page file “[Link]” should be invoked and on clicking ART
a web page file “[Link]” should be invoked.
44) Write exact output of the following HTML code with font specifications in
brackets:Mar10
<html> <body> <h1> <u> Network Connectivity Devices </u> </h1>
<ul> <li> Modem <li> Hub <ul> <li>Repeater <li> Router
</ul> </ul> </body> </html>
45) Write HTML code for the following : Mar10
No. of Books Purchased
F.Y.J.C. S.Y.J.C.
2004 1200 1300
Year
2005 1250 1400
46) Write the exact output of the following HTML code with font specifications in brackets.
(Oct2003)
<html> <title> Introduction</title>
<body> <h1><b>COMPUTER SCIENCE </b> </h1>
<hr> <u> SCHAUM‟S SERIES </u>
<hr> <u> SCHAUM‟S OUTLINE SERIES </u>
<hr> <h5>SEYMOUR LIPSCHUTZ</h5>
</body> </html>
12 | P a g e Chap 4 HTML Computer Science (D9-1)
47) Write the HTML code for the following (Oct2003)
SCIENCE
F..[Link]. [Link]. [Link].
300 100 25
ARTS
F..Y.B.A. S.Y.B.A. T.Y.B.A.
200 150 40
COMMERCE
F..[Link] [Link] [Link].
300 70 50
48) Write the HTML code for the following table : (Mar2004)
Year
1999 2000 2001
Sales Units 300 750 1200
Income Rs. 3000 Rs. 7500 Rs. 12000
49) Write a HTML code using VB Script for designing a Web-Page which greets “Good
Morning” if time is from 12:00 am upto 12:00pm else it greets “Good Afternoon”.
(Mar 2004)
50) Write the exact output for the following codes specifying RGB colours and output
specifications in brackets. (Oct2004)
<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>
51) Write HTML code for displaying a web page containing a six celled table as shown
below (Oct2004)
Sachin Saurav Laxman
First Second Third
13 | P a g e Chap 4 HTML Computer Science (D9-1)
52) Write the exact output of the following HTML code with font specifications in brackets :
(Mar2005)
<html> <body> <h1 align=”center”>LIST OF TOPICS </h1>
<hr> <ol>
<li> <p align = “left” > Operating System </p>
<li> <p align = “left” >Data Structure </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>
53) Write HTML code for the following (Mar 2005)
COMPUTER PAPER -I PAPER-II TOTAL
SCIENCE
100 100 200
54) Write an exact output of the following HTML code with font specifications in brackets
(Oct2005)
<html> <h1> <center> HSC SYLLABUS </center> </h1>
<h3> PAPER I </h3>
To know more about
<p> Just clock on here
<address>
<b> Data Structure </b> <b> GUI </b> <b> HTML </b> <b> C++ </b>
<b> VB </b> </address> </body> </html>
55) Write HTML code for web page displaying the following table : (Oct2005)
Weather Forecast
Wind From To
City speed
Mumbai 39 South West
Raigad 47 South West
Panaji 42 East South
Speed in Km/hr.
56) Write the HTML code for the following: (Mar2006)
Faculty
Arts Science Commerce
Students Boys 100 400 500
Girls 300 300 400
14 | P a g e Chap 4 HTML Computer Science (D9-1)
57) Write the exact output of the following HTML code with font specification in brackets:
(Mar 2006)
<html> <title>Introduction</title>
<body> <h1> <b> Computer Science</b> </h1>
<hr> <u> E Balguru Samy </u>
<hr> <h4> Achyut S Godbole </h4> </body> </html>
58) Write a HTML code for the following: Oct 2006
Government of Maharashtra <–Text size in h2
Education
PWD ADMN
for details
feel free to approach us
PWD is a link available where checking on PWD a webpage file „[Link]‟ should be
invoked. On clicking ADMN a webpage file „[Link]‟ should be invoked. On clicking for
details the user can write e-mail to mail-address „free_free@[Link]‟. On clicking feel
free to approach us, user can invoke to website „[Link]‟.(Oct2006)
59) Write the exact output of the following HTML code with font specification in brackets :
Oct 2006
<html> <title> Examination </title>
<body> <h1> <b> First Semester Exam </b> </h1>
<hr> <u>MATHEMATICS</u> <hr> <u>STATISTICS</u>
<hr> <u>BIOLOGY</u> <hr>
<h5>MSEC BOARD </h5>
</body> </html>
60) Write the exact output of the following HTML code with font specifications in brackets :
(Mar2007, Mar 2002)
<html> <body> <h1> LIST OF BOOKS </h1> <hr>
<ul type=”circle”> <li>C++ Programming <li>HTML in Easy Steps
<li>How to solve it By computer </ul>
<ol type=”A”> <li> Microprocessor Programming <li> Networking Essentials
<li> Microcontrollers </ol> </body> </html>
15 | P a g e Chap 4 HTML Computer Science (D9-1)
61) Write the HTML code for the following table (Mar 2007)
SCIENCE
F..[Link]. [Link]. [Link].
800 600 200
ARTS
F..Y.B.A. S.Y.B.A. T.Y.B.A.
500 400 200
COMMERCE
F..[Link] [Link] [Link].
200 150 100
62) Write HTML code for the following (Oct2007)
Subjects
1. English (compulsory)
2. Second Languages
o Physics
Chemistry
Maths
Biology
63) Write the exact output of following HTML code (Oct 2007)
<html> <head> <title> </title> </head>
<body> <table border=”2” width=”50%”>
<tr> <td width=”100%” colspan=”2”>
<h1 align=”center”> HSC Board Exams</h1> </td> </tr>
<tr> <td width=”50%” align=”center”> <u>Paper I </u> </td>
<td width=”50%” align=”center”> <u> Paper II </u> </td> </tr>
<tr> <td width=”50%”>
<p align=”center”> <i>50 Marks </i> </td>
<td width=”50%” align=”center”> <i>50 Marks </i> </td>
</tr> </table> </body> </html>
64) Write the exact output of the following HTML code with font specifications in brackets:
(Mar 2008)
<html> <title> INTRODUCTION</title> <body>
<h1> <b> PCMBEC </b> </h1> <hr> <u> NOBAL‟S SERIES </u>
<h5>WELLKNOWN </h5> </body> </html>
65) Write HTML code for the following: (Mar2008)
Year
2000 2001 2002
Sales Units 500 1000 1500
Income Rs. 5000 Rs. 10000 Rs. 15000
16 | P a g e Chap 4 HTML Computer Science (D9-1)
66) Write the exact output of the following HTML code ( Oct 2008 )
<html> <head> <title> </title> </head>
<body> <h1> Languages </h1>
<ol> <li> English <li> Second Languages </ol>
<ul> <li> Marathi <ul> <li> Hindi <ul> <li> French </ul>
<li> Sanskrit</li> </ul> </body> </html>
67) Write HTML code for the following (Oct2008)
HSC Board Exams
Computer Science 1. Paper I
2. Paper II
200 Marks
68)Write HTML code for displaying following table on the web page (Mar2009)
S.N. Student Name Marks Obtained Total
Test-1 Test-2 Test-3
1 ABC 150 150 125 425
2 LMN 129 130 131 390
3 XYZ 115 125 120 360
69) Write HTML code for the following output (Mar2009)
ART
o MARATHI
o HINDI
o ENGLISH
COMMERCE
o ACCOUNT
o COSTING
o AUDITING
SCIENCE
o PHYSICS
o CHEMISTRY
o MATHS
o COMPUTER SC.
17 | P a g e Chap 4 HTML Computer Science (D9-1)
70) Write the HTML code for the following table (Oct 2009)
Yuvraj 138*
Ind 387 Sehwag 83
Peterson 58
Eng 238 Bopara 49
IND wins Ist ODI by 149
71) Write the HTML code for the following table (Oct2009)
Students
Year Boys Girls Total
2006 55 75 130
2007 75 95 170
Record
18 | P a g e Chap 4 HTML Computer Science (D9-1)
Q) What is HTML? What are its advantages and disadvantages ?
(Mar 06, 09, 14, 19 July 17 Oct 02, 03, 09 Dec 20 )
What is HTML :
1) HTML stands for Hypertext Markup Language. HTML has its own syntax rules for
[Link] is not really a programming language, but it is a markup language.
Generally HTML is used for creating the web-pages. So it is a Internet Programming
Language.
2) Using this language, programmer can creates web-page which can be viewed in any web
browsers, such as Netscape navigator or Internet Explorer.
3) Hyper text is a ordinary text & adding extra features such as formatting, images,
multimedia & links to other documents etc.
4) The Mark-Up is the process of taking ordinary text & adding the extra symbols, such as
editor‟s proof reading symbols are type of mark-up. Each of the symbol used for mark-up in
HTML is command that tells the browser how to display the text or page.
5) Thus a Mark-Up Language are special type of computer languages. They are concerned
with only parts of documents according to their functions.
6) HTML is invented by Tim Berners-Lee at CERN in Europe LAB. It have extension for
file is .htm or .html file.
Advantages of HTML :
There are several advantages of HTML are enlisted below :
1) For creating HTML document, only text editor is needed. No special S/W is needed.
2) HTML document can be created on any H/W 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 hyper linking facility is available.
7) Independent work can be done & needed not to worry about editing program.
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
upgrades to purchase.
10) Learning HTML is very simple than any programming language.
Disadvantages of HTML :
Apart from several advantages. HTML has certain limitations as listed below:
1) HTML is not programming language in true sense.
2) Any simple calculation cannot be done in HTML.
3) It can not be used to display even date.
4) The interactive web-pages can not build by HTML.
5) The web-pages developed in HTML can not 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.
19 | P a g e Chap 4 HTML Computer Science (D9-1)
Q) Explain features of HTML? ( Mar 2003)
Features of HTML
The followings are some features provided by HTML
1) Hypertext Markup Language or HTML is a set of codes that is used to creates documents
and then it can be published on the world wide web.
2) HTML lets user to jump from topic rather than finding and reading information linearly.
3) Documents prepared in HTML includes reference graphic and formatting tags.
4) HTML is a hyperlink specification language.
5) HTML supports to frames including target windows and borderless frames.
6) It contains powerful formatting facilities for text, page, images etc.
7) If 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
documents.
8) It supports for .BMP (paint files) and .GIF(graphical image file).
9) HTML supports forms which makes it possible to creates documents that collects and
process uses input.
10) HTML tells how to makes a document interactive through special hypertext links.
Q) What is HTML? Name any two software that are used for writing HTML codes.
State any one advantage and one disadvantage? (Oct 2002)
Different Software that are used for writing HTML codes.
To develop or writes a HTML code the following softwares are used
1) Notepad or wordpad in windows accessories.
2) Microsoft Word in Microsoft office Suite.
3) Simple text in Macintosh.
4) Pico in Unix.
Q) Explain the procedure and view HTML document?
Procedure to prepare and view HTML document
To prepares HTML page following steps of procedure are followed.
Step 1 Open a text editor e.g. Notepad.
Step 2 Writes the appropriate HTML code.
Step 3 Save the HTML code in a file having extension .html or .htm.
e.g. [Link]
Step 4 Open the browser where HTML page is opens e,g, Internet Explorer.
Step5 Browse the file or file type in the appropriate address of the HTML file in the address
bar to view the HTML page.
What are Tags :
A tag is a single unit of mark-up. It is a set of symbols, defined in HTML to have a
special meaning. Every tag in HTML has a meaning and it is usually straight forward. Every
tag is starts with a less than sign ( < ) followed by a keyword & conclude with greater
than ( > ) sign. These symbols together known as angle brackets. The attributes are inserted
within tag that are used to affect tag‟s behaviors.
There are two types of tags in HTML :
1) Start tag : Start tag are used to begin an effect.
2) End tag : End tag are use to end that effect. Name of end tag is same as that of start tag but
it is preceded by forward slash ( / )
20 | P a g e Chap 4 HTML Computer Science (D9-1)
Q) Explain general structure of HTML page. Mar 20
OR With syntax diagram explain structure of HTML webpage. Mar 17
OR Give the structure of HTML web page. Oct 11, 14
Structure of HTML web page or How HTML web page is developed or Syntax of
HTML
Every HTML document has the same general structure and it consists of few tags that
defines the page as a whole. The primary part of HTML document are denoted by <html>,
<head> and <body> tags. Each of these tags are known as Document Structure Tags.
HTML files are always starts with <html> tag. Similarly ended with </html> tag. It
declares text within web page viewed in a web browser.
Sections of HTML code syntax
HTML document can be divided into two sections as stated follows.
1) The head section:
It is like an introduction to the page. It generally consists of title of the page. To
defines head add <head> tag at the beginning and </head> tag at end of headings.
2) The body section :
In this user enters the text images and other tags that will actually appears on
the web page.
To defines the body pace <body> tag is used at the beginning and </body> tag at the
end after the
head section.
The basic structure is like below
<html>
<head>
<title> title of the document </title>
</head>
<body>
Actual code of HTML is write here.
</body>
</html>
21 | P a g e Chap 4 HTML Computer Science (D9-1)
Essential tag OR Basic tag in HTML :
1) < HTML > tag :
This tag tells browser that the file is opened in HTML file. This contains
< HTML > start tag & < / HTML > end tag. The start tag starts opening contents & end tag
ends.
e.g. < HTML >
<HEAD >
< TITLE > MY WEB BROWSER < /TITLE > < /HEAD >
< BODY >
< B > THIS IS MY WEB BROWSER CONTAINS HTML HEADING < /B >
< /BODY>
< /HTML >
2) < HEAD > tag : (Aug 19)
It defines the header area of the page which is not displayed within
the page itself in the browser. It mainly contains < TITLE > tag definition. It also includes
base, isindex, meta, script, style and link tags.
e.g < HTML >
<HEAD >
< TITLE > MY WEB BROWSER < /TITLE > < /HEAD>
3) < TITLE > tag : (Oct 02 , Aug 19)
It displayed the text between enclosed in start ( < TITLE > ) tag & end
( / TITLE ) on the title bar when executed within browser. It is placed in between <head>
and end </head> tag.
e.g. < HTML >
<HEAD >
< TITLE > MY WEB BROWSER < /TITLE > < /HEAD>
4) < BODY > tag : (Mar 08 Oct 05 Aug 19)
The actual contents of the web-page that will be displayed on the browser
will appears in the body section of document. The body section starts with start
( < BODY > ) tag & end ( / BODY).
Attributes of <body> tag : The <body> tag includes attributes such as background, bgcolor,
text, link, vlink etc.
e.g. < html >
< body background=”c:\[Link]”>
<body bgcolor=”red”>
< P > This is a web page which demonstrates the body tags explanation. < /P >
< /BODY >
< /HTML >
Q) Explain the attributes of BGCOLOR and BACKGROUND of <BODY> tag.(O 08)
22 | P a g e Chap 4 HTML Computer Science (D9-1)
FORMATTING TAGS :
1) < B > tag : (Mar 05, 13)
This tag is used for to bold text. The text appeared in the start < B > tag & end
</B> tag will displayed bold letters.
Example :
< HTML >
< BODY>
< B > This is a example of bold tag. < / B >
< / BODY >
< /HTML >
2) < I > tag : (Mar 13)
This tag is used for to italics text. The text appeared in the start < I > tag & end </ I>
tag will displayed italic letters.
Example
< HTML >
< BODY>
< I > This is a example of italic tag. < / I >
< / BODY > < /HTML >
3) < U > tag : (July 16, Oct 07 )
This tag is used for to underline text. The text appeared in the start
< U > tag & end </U> tag will displayed underlined below letters.
Example :
< HTML >
< BODY>
< U > This is a example of italic tag. < / U >
< / BODY >
< /HTML >
4) < STRONG > tag :
This is a strong tag. The text appeared in the start < STRONG > tag & end
< / STRONG > will displayed in bolded letters. But the main difference between
< STRONG > & < B > is that the < STRONG > tag gives grammatical supports, it also
supports pronunciation‟s to the text.
e.g < HTML >
< BODY>
< P > This is a best performance grammar < STRONG > using strong tag
< / STRONG >
< /P >
< / BODY >
< /HTML >
5) < EM > tag : (Mar 15 Aug 18 )
This is a Emphasis tag. The text appearing in start < EM > & end
< / EM > is displayed in the italic form. But the main difference between < EM > & < I >
tags is that < I > only italics the word, whereas < EM > italics the word as full supports of
grammars.
23 | P a g e Chap 4 HTML Computer Science (D9-1)
e.g < HTML >
< BODY>
< P > This is a best performance grammar < EM > using EM tag
< / EM >
< /P >
< / BODY >
< /HTML >
6) < P > tag : (Mar 07, 11 Oct 05, 21)
This is a paragraph tag. A paragraph can be created by enclosing text within
paragraphs codes in start < P > tag & end < / P > tag.
Attributes used with < P > tag :
i) < P align = “left ” > aligns to the left.
ii) < P align = “right ” > aligns to the right.
iii) < P align = “center ” > aligns to the center.
e.g. < HTML >
< BODY>
< P align = “center” > This is a paragraph tag.
Using this tag the text enclosed between this is paragraphed.
< /P >
< / BODY >
< /HTML >
7) < PRE > tag : (Mar 04, 07, 12 Aug 18 Oct 03, 06, 14)
This is a pre-format tag. The text appearing in the start < PRE > & end < / PRE > is
displayed in the monospace form. Using this tag we can position the character. Generally this
tag is used in the columnar lists.
e.g <HTML>
< BODY >
< PRE > SrNO NameOfStudents RollNo Total < / PRE >
< / BODY>
< / HTML>
Line Break tag
1) < BR > tag : (Mar 11, 12 Oct 02, 04)
This is a line-break tag. The text appearing in the start < BR > tag & end < / BR > tag
writtens to the next line or new line. So it is also called as carriage return tag. It has no
closing tag.
e.g. <HTML>
< BODY >
< B > This is a first line without using ( BR ) tag.
< BR > This a second line using (BR ) tag.
< / BODY>
< / HTML>
24 | P a g e Chap 4 HTML Computer Science (D9-1)
Ruler Tag :
1) < HR > : (Mar 16, Oct 06)
This is a Horizontal Ruler Tag. The text appearing with start < HR > & end < / HR >
tag divides separate sections by a ruler line.
Attributes used with < HR > tag :
i) < HR SIZE > This tag is used for to sets the size of the horizontal ruler line.
ii) < HR WIDTH > This tag is used for to sets the width of the horizontal ruler
line.
e.g < HR SIZE = “ 6 ” WIDTH = “ 6 0 % ” >
FONT TAGS :
1) < FONT > (Oct 15)
This is a font tag. It is used for to sets the font name, font size & font colour.
Attributes used with < FONT > tag :
i) < FONT FACE > : This used for to gives the name of font.
e.g. < FONT FACE = “ ARIAL ” >
ii) < FONT SIZE > : This is used for to gives the size of the font ranging size upto
1 to 7.
e.g. < FONT SIZE = “4” >
< FONT SIZE = “ + 4 ” > Size makes larger 4 step to current font position.
< FONT SIZE = “ – 4 ” > Size makes smaller 4 step to current font position.
iii) < FONT COLOR > This is used for to gives the color to the font.
e.g. < FONT COLOR = “ PURPLE ” >
2) < SUB > tag : (Mar 04, 08,12 Aug 18 Oct 04, 05, 07)
This is a subscript tag. The text appeared in the start < SUB > & end < / SUB > is
displayed in the subscript form i.e. bit lower than text. It is generally used for to showing
chemical formulae.
e.g. H < SUB > 2 < / SUB > O it shows H2O
3) < SUP > tag : (Mar 04,05 Aug 18 Oct 10)
This is a superscript tag. The text appeared in the start < SUP > & end < / SUP > is
displayed in the superscript manner i.e. bit upper than the text. It is generally used to
showing the mathematical formulae raised to the power.
e.g. 3 < SUP > 2 < / SUP > It shows 32
4) < STRIKE > tag :
This is a strike tag. The text appeared in the start < STRIKE > & end
< / STRIKE > is displayed a line drawn through the middle of the text. The tag < S > is also
used instead of < STRIKE > & < / S > is used instead of < / STRIKE >.
e.g < STRIKE > This is a strike tag. < / STRIKE > is shown This is a strike tag.
5) < BIG > tag : (Oct 10)
This is a big tag. The text appeared in the start < BIG > tag & end < / BIG > tag is
displayed in the larger font. The < BIG > tag has also the same effect as
< FONT SIZE = “ + 2 ” >.If already the size is largest then this tag is ignored.
e.g < BIG > This is a effect of BIG tag < / BIG >
25 | P a g e Chap 4 HTML Computer Science (D9-1)
6) < SMALL > tag : (Oct 10)
This is a small tag. The text appeared in the start
< SMALL > tag & end < / SMALL > tag is displayed in the smaller font. The
< SMALL > tag has also the same effect as < FONT SIZE = “ - 2 ” >.If already the size is
smallest then this tag is ignored.
e.g < SMALL > This is a effect of small tag < / SMALL >
7) < MARQUEE > tag : (Mar 08, Oct 02, 14)
This is a marquee tag. The text enclosed in would rolled over horizontal line on the
web-page. It is continuously rolling words till you close the application.
e.g. < MARQUEE > My marquee tag < / MARQUEE >
8) < A > tag :
This is a anchor tag. It is used to creates link or hyper links. The text or images
enclosed between starting tag < A > & ending tag < / A > is a link. This link is clickable in a
graphical browser. The object to which the link has to be made is defined by the HREF
attribute which refers to hypertext reference.
** Attribute of <A> :
Within <A> anchor tag to link with other attribute HREF, NAME and TITLE these
three attributes are used.
a) HREF : (Oct 04)
1) HREF is an attribute used with <A> i.e. anchor tag to link other document, images etc.
2) HREF refers Hyper Text Reference.
3) This attribute marks the anchor as the start of a link to another
document/resource/particular place in another document.
e.g. < A HREF = “ c:\[Link] ” > < /A >
b) NAME :
It is used to creates named anchor i.e. bookmark.
c) TITLE
It is used to give title to link.
9) < ADDRESS > tag:
This tag displays web page‟s information such as page URL
(uniform resource locator ). The text enclosed in the < ADDRESS > < / ADDRESS > is
recognized by search engines as your address information. URL is address for a web-page. It
is unique for each page.
e.g. http : //[Link]/
In above example http is a hyper text transfer protocol & [Link] is
domain name i.e internet name of computer that is serving the information.
e.g. < ADDRESS > HTML NOTES email : htmlnotes@[Link]</ADDRESS >
26 | P a g e Chap 4 HTML Computer Science (D9-1)
List tag :
1) < LI > tag : (Mar 07, 13 Oct 07)
This is a list tag. Generally used for collection group of items.
e.g. <li> Sachin : It shows Sachin
<li value= “10” > Sachion : It shows [Link]
Types of list tags :
There are two types of list tags used in HTML called as ordered list tag and unordered
list tag.
i)unordered list tag ( < UL > ) : (Mar 18 Oct 06)
This is a unordered tag. The list are displayed in bulleted form. Unordered lists can be
preceded by one of the several bullet styles like a closed circle ( ), an open circle ( ) , a
square ( ). It contains the start < UL > & </UL>.
Attributes with < UL > tag :
1) < UL TYPE = “ CIRCLE ” : it used for a hollow bullet ( ).
2) < UL TYPE = “ DISC ” : it used for a solid bullet ( )
3) < UL TYPE = “ SQUARE ” : it used for a square bullet ( )
e.g. < html>
< body >
< ul type = “ square ” > < li > Square bullet of unordered list.
< ul type= “ disc ” > < li > Solid circle bullet of unordered list.
< ul type = “ circle > < li > Open circle bullet of unordered list.
</ul> </body> </html>
The above example shows as :
Square bullet of unordered list.
Solid circle bullet of unordered list.
o Open circle bullet of unordered list.
ii) Ordered List tag ( < OL > ) : (Mar 05, 18 Oct 14)
Ordered List are numbered in some fashion. Ordered list can be preceded by Arabic
Numerals, Uppercase or Lower Case Roman Numerals or Uppercase or Lowercase
Alphanumeric characters. It contains start < OL > & end < / OL > tag.
Attributes used with ordered list tag:
1) < OL TYPE = “ 1 ” > : It shows Arabic numbers.
Eg. < OL TYPE = “ 1” >
<LI> This is a first lie < LI> This is a second line. < LI > This is a third line.
</OL>
It Shows as such like follows :
1. This is a first lie
2. This is a second line.
3. This is a third line.
2) < OL TYPE = “ a ” > : It shows lowercase alphanumeric.
Eg. < OL TYPE = “ a” >
<LI> This is a first lie < LI> This is a second line. < LI > This is a third line.
</OL>
27 | P a g e Chap 4 HTML Computer Science (D9-1)
It Shows as such like follows :
a) This is a first lie
b) This is a second line.
c) This is a third line.
3) < OL TYPE = “ A ” > : It shows uppercase alphanumeric.
Eg. < OL TYPE = “ A” > <LI> This is a first lie < LI> This is a second line.
< LI > This is a third line. </OL>
It Shows as such like follows :
A. This is a first lie
B. This is a second line.
C. This is a third line.
4) < OL TYPE = “ i ” > : It shows lowercase roman numbers.
Eg. < OL TYPE = “ i” > <LI> This is a first lie < LI> This is a second line.
< LI > This is a third line. </OL>
It Shows as such like follows :
i. This is a first lie
ii. This is a second line.
iii. This is a third line.
5) < OL TYPE = “ I ” > : It shows uppercase roman numbers.
Eg. < OL TYPE = “ I ” > <LI> This is a first lie < LI> This is a second line.
< LI > This is a third line. </OL>
It Shows as such like follows :
I. This is a first lie
II. This is a second line.
III. This is a third line.
6) < OL START = “ X ” > : X contains any starting number.
e.g < OL START = “10” > then list is ordered from 10.
iii) Definition List tag ( < DL > ) : (Mar 15)
The definition list elements uses < DL > start tag & </DL> end tag to creates a
definition list. This list is rendered without bullets.
< DT > tag is used for definition terms i.e. name or title of the item you are defining. The
< DD > tag is used for the definition themselves.
e.g. < DL >
< DT > Term A < DD > Definition of term A < DT > Term B
< DD > Definition of term B < /DL >
In above example the screen displayed
Term A
Definition of term A
Term B
Definition of term B
28 | P a g e Chap 4 HTML Computer Science (D9-1)
Heading Tag :
A web-page can have a maximum of six levels of headings.
1) < H1 > : It shows in very larger font than any other H2,H3,H4,H5 & H6.
2) < H2 > It shows in larger font than any other H3,H4,H5 & H6.
3) < H3 > It shows in larger font than any other H4,H5 & H6.
4) < H4 > It shows in larger font than any other H5 & H6.
5) < H5 > It shows in larger font than any other H6.
6) < H6 > It shows in very smaller font than any other H2,H3,H4,H5.
e.g. < H1 > This is a H1 heading tag </H2>
Adding colors various colors in HTML page :
You adds different color schemes in HTML page. One of color scheme is known as
RGB color scheme. It is a combination of RED, GREEEN & BLACK colors & forms
different colors. The colors are specified in your document by simple color name RED,
GREEN, BLACK, YELLOW etc these are RGB schemes.
There are six body attributes : BGCOLOR, BACKGROUND, TEXT, LINK, VLINK
& ALINK etc.
Eg. < BODY BGCOLOR= “ RED” TEXT = “ BLACK ” >
< BODY VLINK= “ MARRON” >
Q) Explain use of the following attributes of <IMG> tag with suitable example: Mar10
i) ALT ii) HEIGHT iii) SRC
Adding Images in HTML :
You also inserts pictures, images, photographs in HTML documents. These can be
inserted by tag < IMG > & its many attributes.
< IMG > tag : This is a image tag. Its purpose is to include a graphic images in the body of
the web page. There are two types of images as listed below :
1) Inline Images : The inline images are aligned in top, middle and bottom. But by default it
is middle of a line of text.
2) Floating images : These are two typed aligned images as left and right. It causes text wrap
around the image. To make an image as a separate paragraphs, it is enclosed within
paragraph elements as stated below :
< P > < IMG SRC = “ C:\[Link]”> < / P >
Attributes with < IMG > tag :
Generally SRC attribute & ALT attributes are used with < IMG > tag.
1) SRC attributes : It gives appropriate path of image file for searching.
e.g < IMG SRC = “ C:\[Link]” > This searches the file on C: & when located insert it.
2) ALT attribute : For any browser i.e. not displaying images, the alternate text contained
inside the ALT attribute is displayed instead.
e.g < IMG SRC = “ C:\[Link]” ALT = “ picture “ >
29 | P a g e Chap 4 HTML Computer Science (D9-1)
3) Images Alignments : Images can aligned with ALIGN attribute. It aligns images top,
middle & bottom.
Eg. < IMG SRC = “ C:\[Link] ” ALIGN = “ MIDDLE” >
< IMG SRC = “ C:\[Link] ” ALIGN = “ TOP” >
< IMG SRC = “ C:\[Link] ” ALIGN = “ BOTTOM” >
< IMG SRC = “ C:\[Link] ” ALIGN = “ LEFT” >
< IMG SRC = “ C:\[Link] ” ALIGN = “ RIGHT” >
< IMG SRC = “ C:\[Link] ” ALIGN = “ CENTRE” >
4) Setting images width & size : Images width & size is also sets by WIDTH & HEIGHT
attributes. E.g < IMG SRC = “ C:\[Link] ” WIDTH = “ 25 ” HEIGHT = “ 120 ” >
Creating Hyper links in HTML documents :
The hyper link name suggested that to links one document to another documents or to
one image to another image or one address to another address etc. In HTML these links are
also created by using a special tag called anchor tag < A>.
The links are created to jumps from one document to other or image or any local or
web page by using tag <a>.
Attributes for <a> and <link>
The following are the attributes appropriate to either anchor<a> or LINK elements.
1) HREF (links to object).
2) NAME (link from object).
3) TITLE(title of document).
Syntax : < A HREF = “ c:\[Link]” > This links your main documents to [Link]
document.
Q) List any three types of hyperlinks with suitable example? (Mar 03)
In HTML link is created to jumps from one document to other or image or any local or
web pages by using
There are three types of hyperlinks in HTML as stated below:
1) Link to page on the WWW ( world wide web ) :
e.g. < A HREF = [Link] Enters your name < /A>
In this example the string “ Enters your name” is a hypertext link to the website
indicated by URL ( universal resource locator ) specified.
2) Link to a image by image as a link :
e.g < A HREF = “ c:\[Link]” > < IMG SRC = “ d:\[Link]”></A>
In this example the two images are links together i.e. c:\[Link] is hypertext link to
the image d:\[Link].
3) Link to document located in different directory :
e.g < A HREF = “ d:\picture\[Link]” > Click here < /A>
In this example the link is created on the text string “ Clock here” when cliking on that
string the destination web page is displayed which is specified in the path given
30 | P a g e Chap 4 HTML Computer Science (D9-1)
Creating tables in HTML page : Tables are created in HTML page by a < TABLE > tag.
1) < TABLE >
This is a table tag. It organizes given data in a table format such as row & column
format. Table tag is created by start < TABLE > & end < / TABLE> tag.
Attributes of < TABLE > tags :
Following are attributes which uses within < TABLE > tag.
a) < TABLE WIDTH > It specifies the width of the table.
e.g. < TABLE WIDTH = “ 50 % ” > It specifies table width size is 50%.
b) < TABLE HEIGHT > It specifies the height of the table.
e.g. < TABLE WIDTH = “ 50 % ” TABLE HEIGHT= “ 12” > It specifies table width
size is 50% & height of table is 12.
c) < TABLE ALIGN = “ LEFT” > It horizontally aligns left to the specified table. It is
default.
d) < TABLE ALIGN = “ RIGHT” > It horizontally aligns right to the specified table.
e) < TABLE ALIGN = “ CENTER” > It horizontally aligns center to the specified table.
f) < TABLE BORDER = “ 5” > It sets table border size is 5.
g) < TABLE BORDER = “ 1” > It sets table border size is 1.
h) < TABLE BORDER = “ 0” > It sets no border for table.
Note : By default table border is zero when not specified it considers zero.
i) < TABLE CELLSPACING = “ 12” > It creates 12 spaces between each cell.
The cell spacing is not default you specifies any space size.
j) < TABLE CELLPADDING = “ 5 ” > It increases the amount of spaces between a cell
boarder & the cell data. In example amount space is 5. It is not default size you
specifies any amount of size. When not specifies any cell space by default 1.
k) < TABLE BGCOLOR > It sets the background color to table.
2) < CAPTION > tag :
This tag is used to crates a caption on the top of or below the
table. It requires start < CAPTION > tag & end < / CAPTION > tag. It is aligned with align
attributes. It aligns caption left, right, top & bottom as stated following example.
e.g < TABLE >
< CAPTION ALIGN = “ TOP ” >
It was table caption aligned top tag < /CAPTION> < /TABLE >
3) < TR > (Mar 05)
It is a table row tag. It contains the start < TR> & end </TR> tag. It creates a
horizontal row of cells & contains table headings or table data. Each use of a table row i.e. <
TR > begins a new table row. A row must contains atleast one table data element or table
heading elements. Table data is determined by < TD > tag & table heading elements is
determined by < TH > tag.
It includes attributes like ALIGN, BGCOLOR & VALIGN.
HORIZONTAL ALIGN attribute with < TR > : With < TR > tag we also uses horizontal
align attributes such as left, right, center etc. Which aligns table row left, right, center
respectively.
e.g. < TR ALIGN = “ LEFT ” > It displays table row horizontally aligns to left.
< TR ALIGN = “ RIGHT” > It displays table row horizontally aligns to right.
< TR ALIGN = “ CENTER” > It displays table row horizontally aligns to center.
31 | P a g e Chap 4 HTML Computer Science (D9-1)
VERTICAL ALIGN attribute with < TR > : With < TR > tag we also uses vertical align
attributes such as top, middle, bottom, baseline, etc.
eg. < TR VALIGN = “ TOP ” > It displays table row vertically aligns to top side.
< TR VALIGN = “ MIDDLE ” > It displays table row vertically aligns to middle side.
< TR VALIGN = “ BOTTOM ” > It displays table row vertically aligns to bottom side.
< TR VALIGN = “BASELINE ” > It displays table row vertically aligns to baseline side.
COLOR attribute with < TR > : We also specifies the background color to the table row.
The attribute BGCOLOR is used with < TR > tag.
e.g. < TR BGCOLOR = “ PURPLE”> It displays purple as background color for table row.
4) < TH > tag : ( Mar 13)
This is a table heading tag. It contains start tag < TH > & an end tag
< /TH >.It creates headings. By default, text enclosed in start & end tag is bolded & centered
form.
Attributes used with < TH > tag:
1) Width attribute : This specifies the width of table heading.
e.g < TH WIDTH = “ 50 ” > It determines the width of table heading is 50.
2) HEIGHT attribute :This specifies the height of the table heading.
e.g < TH HEIGHT = “ 30 ” > It determines the height of table heading is 30.
3) HORIZONTAL ALIGN attribute with < TH > : With < TH > tag we also uses
horizontal align attributes such as left, right, center etc. Which aligns table row left, right,
center respectively.
e.g. < TH ALIGN = “ LEFT ” > It displays table heading horizontally aligns to left.
< TH ALIGN = “ RIGHT” > It displays table heading horizontally aligns to right.
< TH ALIGN = “ CENTER” > It displays table heading horizontally aligns to center.
4) VERTICAL ALIGN attribute with < TH > : With < TH > tag we also uses vertical
align attributes such as top, middle, bottom, baseline, etc.
eg. < TH VALIGN = “ TOP ” > It displays table heading vertically aligns to top side.
< TH VALIGN = “ MIDDLE ” > It displays table heading vertically aligns to middle side.
< TH VALIGN = “ BOTTOM ” > It displays table heading vertically aligns to bottom side.
< TH VALIGN = “BASELINE ” >It displays table heading vertically aligns to baseline
side.
COLOR attribute with < TH > : We also specifies the background color to the table
heading. The attribute BGCOLOR is used with < TH > tag.
e.g. < TH BGCOLOR = “ PURPLE”> It displays purple as background color for table
heading.
5) < TD > tag : (July 16)
This is a table data tag. It contains start tag < TD > & an end tag
< /TD >.It creates individual cells. The number of cells in the row determines the number of
columns. By default, text enclosed in start & end tag is left & centered vertically.
32 | P a g e Chap 4 HTML Computer Science (D9-1)
Attributes used with < TD > tag:
1) Width attribute : This specifies the width of table data.
e.g < TD WIDTH = “ 50 ” > It determines the width of table data is 50.
2) HEIGHT attribute :This specifies the height of the table data.
e.g < TD HEIGHT = “ 30 ” > It determines the height of table data is 30.
3) HORIZONTAL ALIGN attribute with < TD > : With < TD > tag we also uses
horizontal align attributes such as left, right, center etc. Which aligns table row left, right,
center respectively.
e.g. < TD ALIGN = “ LEFT ” > It displays table data horizontally aligns to left.
< TD ALIGN = “ RIGHT” > It displays table data horizontally aligns to right.
< TD ALIGN = “ CENTER” > It displays table data horizontally aligns to center.
4) VERTICAL ALIGN attribute with < TD > : With < TD > tag we also uses vertical
align attributes such as top, middle, bottom, baseline, etc.
eg. < TD VALIGN = “ TOP ” > It displays table data vertically aligns to top side.
< TD VALIGN = “ MIDDLE ” > It displays table data vertically aligns to middle side.
< TD VALIGN = “ BOTTOM ” > It displays table data vertically aligns to bottom side. <
TD VALIGN = “BASELINE ” >It displays table data vertically aligns to baseline side.
COLOR attribute with < TD > : We also specifies the background color to the table
data. The attribute BGCOLOR is used with < TD > tag.
e.g. < TD BGCOLOR = “ PURPLE”> It displays purple as background color for table data.
6) COLSPAN & ROWSPAN attributes used with < TD> & < TH :
COLSPAN & ROWSPAN are the special attributes that can be used with < TD> &
<TH> tags. There may be some situation, in which one cell of table to span more than one
row or more than one column. For this merging situations, COLSPAN & ROWSPAN
attributes are used with the < TD> & < TH > tags.
COLSPAN attribute : This spans the relevant columns i.e it makes the cell contents
merge to the another cells.
e.g < TD COLSPAN = “ 2 ” > This merges the two columns in table‟s data elements.
< TH COLSPAN = “ 3 ” > This merges three columns for table heading.
ROWSPAN attribute : This spans the relevant rows i.e it makes the cell contents merge
to the another cells. It also specifies how many rows a cell should takes up.
e.g < TD ROWSPAN = “ 2 ” > This merges the two rows in table‟s data elements.
< TH ROWSPAN = “ 3 ” > This merges three rows for table heading.
33 | P a g e Chap 4 HTML Computer Science (D9-1)
Study of VB Script :
A script name suggested that it contains series of commands in its own script language
tag. This script commands are executed under the host environment or server. Scripting
languages are special programming languages. These are used on web-page to controls
different elements of the page including controls frames & browser interface. Using scripts
in web-page it runs dynamically 0r actively this HTML page is then known as DHTML i.e.
dynamic hyper text markup language.
In market most scripting languages are available but most popular scripting languages
are used in creating web-page are VB Script & Java Script. VB script are writtens under the
tag < SRIPT > tag.
** Advantages or Features of VB SCRIPT :
1) VB Script are designed to be faster. Because this script does not supports any strict data
type i.e integer, character, float etc.
2) VB Script only contains one data type as varient.
3) VB Script provides safe security. It provides file system components which consists of
objects, which can be used to perform I/O.
4) VB Script contains rich set of functions for performing various types of operations via
array, manipulating functions, data & time functions, string functions, mathematical
functions, conversion functions etc.
5) VB Script allows user to access & handles error through the use of Err object.
** Disadvantages OR Limitations of VB Script :
1) All VB Script arrays are zero based. It do not allows user to change the base of an array
variables for specific implementation.
e.g. If we want to create array of 10 size numbers then array is started from 1. But we need to
start array from 0.
2) VB Script can not creates user-defined data types.
3) VB Script can not supports Dynamic Data Exchange ( D.D.E.) .
34 | P a g e Chap 4 HTML Computer Science (D9-1)
< SCRIPT> tag :
The VB Script can be placed in < SCRIPT > start tag & </SCRIPT> end tag. It contains
attributes LANGUAGE= “ VB Script “ as stated follows :
< SCRIPT LANGUAGE = “ VB Script ” >
// Scripting code
< /SCRIPT>
When browser finds the < SCRIPT> tag then it calls the VB Script interpreter to
compile & executes the given code under < SCRIPT > tag.
e.g. // VB Script displaying local time & day.
< HTML >
< HEAD >
< TITLE > Local time & day < /TITLE >
< /HEAD >
< BODY >
< SCRIPT LANGUAGE = “ VB SCRIPT ” >
[Link] Time( ) & “ on” Month Name ( Month( Now ), False)
& Day ( Now) And Year ( Now )
< /SCRIPT >
< /BODY >
< /HTML >
In above program when browser finds the < SCRIPT LANGUAGE = “ VB SCRIPT>
Tag then it calls interpreter to compile & execute code. The code of VB script is then placed
to Time ( ) then it reads the local time, month name, day & year etc. After completion of
procedure Time ( ) function then [Link] which writes the desired result.
RGB codes or Color codes in HTML with RGB color coding system
Colors in HTML can be specified by color name or by color code known as RGB
code. In RGB code R stands for red, G stands for green and B stands for Blue.
There are 16 color names in HTML such as black, silver, gray, white, maroon, red,
purple, fuchsia, green, lime, olive, yellow, navy blue, teal and aqua.
RGB codes are always 6 numbers. First two numbers specify amount of red color.
Next two numbers are specifies amount of green and last two numbers are specifies amount
of blue color. By mixing these three primary colors in different amount it is possible to
derives any color. RGB code uses hexadecimal numbering system.
Examples RGB codes
1) #FF0000 This is a RGB code for red color.
2) #0000FF This is a RGB code for blue color.
3) #00FF00 This is a RGB code for green color.
35 | P a g e Chap 4 HTML Computer Science (D9-1)
HTML Colors - RGB Values
This color value is specified using the rgb( ) property. This property takes three values, one
each for red, green, and blue. The value can be an integer between 0 and 255 or a percentage.
Note : All the browsers does not support rgb() property of color so it is recommended not to
use it.
Following is a list to show few colors using RGB values.
Color RGB RGB Color
Name Color Values
code in
HEX
Black #000000 rgb(0,0,0)
Red #FF0000 rgb(255,0,0)
Green #00FF00 rgb(0,255,0)
Blue #0000FF rgb(0,0,255)
Yellow #FFFF00 rgb(255,255,0)
Aqua #00FFFF rgb(0,255,255)
Fuchsia #FF00FF rgb(255,0,255)
Silver #C0C0C0 rgb(192,192,19
2)
White #FFFFFF rgb(255,255,25
5)
Gray #808080 rgb(128,128,12
8)
Maroon #800000 rgb(128,0,0)
Purple #800080 rgb(128,0,128)
Lime #00FF00 rgb(0,255,0)
Olive #808000 rgb(128,128,00)
Navy #000080 rgb(0,0,128)
Blue
Teal #008080 rgb(0,128,128)
Q) Explain any three tags of HTML which do not have ending tags. Mar 16
Explain the use of the following attributes of <HR> tag with suitable example. Oct 13
i) ALIGN ii) NOSHADE iii) WIDTH
Q) Explain following tags of HTML with its attributes and suitable example: Oct 15
i) <A> ii) <FONT>
36 | P a g e Chap 4 HTML Computer Science (D9-1)