0% found this document useful (0 votes)
27 views17 pages

HTML For Buiggner

Uploaded by

kingofgod786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views17 pages

HTML For Buiggner

Uploaded by

kingofgod786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

HTML NOTES

Html stands for hyper text markup language.


Hypertext: - is ordinary text that has been formatted with extra features such as bold, italics, size, images, multimedia, and
links to other documents.

Markup:-means the process of taking ordinary text and adding extra symbols, such as editor’s proof reading symbols are
type of markup. Each of the symbol used for markup in HTML is command that tells the browser how to display the text.
HTML is one of the web designing language.

Advantages of HTML:-

1. To develop HTML document only text editor is required.


2. HTML document created on any hardware platform using any text editor.
3. HTML is easy to learn and implement.
4. It contains powerful formatting facilities.
5. Required HTML pages can be updated easily, without changing whole document.
6. Finding error is easy in HTML.
7. Independent work can be done and need not to worry about editing program.
8. HTML will not cost you anything for its use. There are no expensive licenses to buy or no upgrades to purchase.
9. Any HTML document can be traversed due to hyperlinking facility is available.

Disadvantages of HTML
1. HTML is not a programming language, like C,C++,VB.
2. Any simple calculation can not be done in HTML.
3. It cannot be used to display even date.
4. the interactive web pages can not be built by HTML.
5. The web pages developed in HTML can not be behave like application.
6. The web pages developed in HTML can not have their own interface.
7. hyperlink provided in HTML. But for that we need a trip to server at each step.

Tags

A Tag is a special unit of markup. It is a set of symbols, define in HTML to have special meaning. Tag starts with a
less than sign(<)followed by a keyword and close with greater than sign(>). These symbol is called as angle
brackets.
There are two types of the tags in HTML
1. start tag
2. end tag.
 Start tag is used to begin the effect and end tag is used to end the effect of tag.
Name of the end tag is same as start tag followed by forword slash(/) symbol.
Ex:-<I>hello</I>
This <I> tag displays word hello in italic format. </I> indicates the end of the effect.
 Tag can be used in nested format.
Ex:- <B><I>hello</B></I>
In above example hello displays hello in bold as well as in italic format.
Structure of HTML web page

The primary part of the HTML document are denoted by <HTML>,<HEAD> and <BODY>tags. Each of these tags are
known as document structure tags.

<HTML>
<HEAD>

<TITLE>
Title of the document
</TITLE>

</HEAD>
<BODY>
Actual document
</BODY>

</HTML>
HTML document is devided into two section:
1. The <HEAD> Tag:-It is generally used for title of the page. To define head of the page add <HEAD> tag at the beginning
of the head and put </HEAD> at the end of the head.
2. the actual document of the page is inserted into the page is appear in between <BODY> and </BODY> tag.

Basic tags of html:-

1. <HTML>:-
This tag is used to indicate start of the html page, and </HTML> tag is used to indicate the end of the HTML page.
All other tags must reside within the <HTML> and</HTML> tag.
Ex :-

<html>
<body>
<h1>This is Page1</h1>
<p>This is some text.</p>
</body>
</html>

2. <HEAD>:-
This tag defines the header area of the page, which is not displayed within the page itself in the browser.
In the <HEAD> section <TITLE> tag is used to display title for the web page. </TITLE> tag is used to end this <TITLE>
tag. And </HEAD> is used to end the header section of the page.
Ex:-

<html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>

<BODY>:-
the actual document of the web page will be displayed in the browser will appear in the body section. The body section starts
with<BODY> tag and ends with </BODY> tag..
there are several operational attributes are used for this tag such as background image, change the font size, color, etc. it uses
graphics and multimedia attributes.

Ex:- <html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>

Procedure to prepare and view HTML document


1. open the text editor ex, Notepad.
2. write HTML code.
3. save file with .HTML extension.
4. open the file in the internet explorer browser.
5. view the page in browser.
6. view the HTML code in the VIEW menu-> source code.
Formatting tags

In the BODY of the document we can apply formatting like bold, italic, underline, background, text color, font etc.
1. <B>:- bold tag
This is bold tag. The text appearing between start <B> and end </B> will be displayed in bold letters.

EX:- <B>This is html language.</B>

2. <I>:- Italic tag.


This is italic tag. The text appearing between start <I> and end </I> tag will be displayed in italic letters.

3. <U>:-undeline tag
This tag is used for underline the text. The text appearing between start tag <U> and end tag </U> will appear underlined.

4. <FONT> :-Font tag.


This tag is used to format the size, type face and colour of enclosed text.
The font tag used with three different attributes:-SIZE,FACE,COLOR.
1. The SIZE attribute can be specified in absolute or relative values ranging from 1 to 7. using a relative font size l.e. by
putting plus or minus sign before the number will change the font size relative to the default size.
2. The COLOR attribute is specified with a RGB code or specify a color name.
3. The FACE attribute is specifies a type face that is used for the text enclosed by the font element.
Ex1:-
<HTML>
<BODY>
output
<B>this is bold tag</B><br> this is bold tag
<I>This is italic tag</I><br> This is italic tag
<U>This is underline tag</U><br> This is underline tag
<font size="6" color=”blue”>this is font color</font><br>
<p><font color="green">this is font size</font></p>
<font face=”times new roman”>this is face attribute</font><br>
this is font
</HTML>
</BODY>
color
this is font size

this is face attribute


Ex2:-
<html>
<body> This is some text!
<p><font size="3" color="red">This is some text!</font></p>
<p><font size="2" color="blue">This is some text!</font></p> This is some text!
<p><font face="verdana" color="green">This is some text!</font></p>
</body> This is some text!
</html>

5. <BIG>:- big tag

The text enclosed within starting tag <BIG> and ending tag </BIG> is displayed in large font.
If size is already large then, tag is ignored.

6. <SMALL>:- Small tag.

This tag is used to display text in smaller font. The text enclosed in <SMALL> and </SMALL> tag is displayed in smaller
font.

7. <STRIKE>:- strike tag.

The text enclosed within the tags <STRIKE> and </STRIKE> have strike font effect.
Ex:- <STRIKE>this is strike tag</STRIKE>
Output:-This is strike tag

8. <SUB>:- subscript effect

The text enclosed within <SUB> and </SUB> is displayed in subscript form.
9. <SUP>:- superscript tag.

The text enclosed within start tag <SUP> and end tag </SUP> will be displayed in superscript form.
Example of all these above tags.

<html>
<body>

<b>This text is bold</b><br /> output


<big>This text is big</big><br />

<strike>This text is italic</strike><br /> This text is bold


This text is big
<small>This text is small</small><br />
This text is italic
This text is small
This text contains H<sub>2</sub>O<br />
This text contains H2O
This text contains E=mc<sup>2</sup> This text contains E=mc2
</body>
</html>

10. <P>:- paragraph tag.


This tag is used for created by enclosing text within paragraph tags <P>and </P>.
The <P> tag has one optional attribute called align. It allows to specify where the text appears on the screen.
<P align=left> :-left alignment like normal text.
<P align=right>:- right alignment normal text.
<P align=center>:- text is centered.
<P align=justify>:- Text is justified to left and right margin.
Example:-
<html>
<body> This is a paragraph.
<p>This is a paragraph.</p>
<p>This is a paragraph.</p> This is a paragraph.
<p>This is a paragraph.</p>
This is a paragraph.
</body>
</html>

11. headline tag:-

This tag is used to insert headlines of six levels (H1, H2, H3, H4, H5, and H6)
<html>
<body>
<h1>This is heading 1</h1>
This is heading 1
<h2>This is heading 2</h2> This is heading 2
<h3>This is heading 3</h3>
<h4>This is heading 4</h4> This is heading 3
<h5>This is heading 5</h5> This is heading 4
<h6>This is heading 6</h6>
</body> This is heading 5
</html> This is heading 6
12.<BR>:- break line tag.

This tag insert line break into the text flow.

<html>
<body> To break
<p> lines
To break<br />lines<br />in a<br />paragraph,<br /> in a
use the br element.</p> paragraph,
</body>
</html>
use the br element.

13. <HR>:- horizontal rule.


This tag is mostly used for decorative purpose. A web page can be devided into separate sections by using horizontal rulers.
<HR> tag takes several optional attributes. To specify line width and how much of the browser’s windows it should span as a
percentage such as:
<HR size=”6” width=”60%”>

<html>
<body>
<p>This is some text.</p> This is some text.
<hr >
<p>This is some text.</p> This is some text.
</body>
</html>

14. <PRE>:- preformat the text. The text appearing between start tag <PRE> and end tag </PRE> is displayed in
monospace form. This tag is used to position the characters. This tag displays the text in exactly same format as the character
and line spacing format defined in source HTML document.

<html>
<body> Text in a pre element
<pre> is displayed in a fixed-
Text in a pre element width
is displayed in a fixed-width font, and it preserves
font, and it preserves both spaces and
both spaces and line breaks
line breaks
</pre> The pre element is often used
<p>The pre element is often used to display computer code:</p> to display computer code:
<pre>for i = 1 to 10
print i
for i = 1 to 10
next i
print i
</pre>
next i
</body>
</html>

15. <EM>:-emphasis tag.


The text appearing between start tag <EM> and end tag </EM>will displayed in italics. This tag is used to emphasis the text.
<html>
<body> Emphasized text
<em>Emphasized text</em><br> Emphasized text
<I>Emphasized text</I>
</body>
</html>

16. <STRONG>:- strong tag.

The text appearing between start tag <STRONG> and end tag </STRONG> will displayed in bold.
<html>
<body>
Emphasized text
<em>Emphasized text</em><br />
<strong>Strong text</strong><br /> Strong text
</body>
</html>

17. <MARQUEE>:-tag.
This tag is used to scroll the text and images on screen from right to left. The text written between start tag<MARQUEE>
and end tag </MARQUEE> will scroll the text on screen horizontally right to left.
There are three attributes used with <MARQUEE> bgcolor, height,width,BEHAVIOR,HSPACE,VSPACE

Ex:-<MARQUEE>computer science</MARQUEE>

18. <UL>:-Unordered list.

The unorder list is a list of items that have no particular order or sequence.
The special tag <LI> is used to indicate actual list elements.
Unorder list is bullated lists. They can be preceded by one of the bullet styles like a closed circle (•) or open circle(Ο) or
square().
Ex:-
<html>
<body>
An Unordered List:
<h4>An Unordered List:</h4>
<ul type=”square”>  Coffee
<li>Coffee  Tea
<li>Tea  Milk
<li>MilK
</ul>
</body>
</html>

the following attribute is usedwith the <UL> tag.


Type=”circle”
Type=”disc”
Type=”square”

19. <OL>:-Orderlist tag.


This tag is used to when the sequence of the list of items is required. The ordered list are numbered in some fashion. The list
items can be preceded by Arabic numerals, upper case or lower case roman numerals, or upper/lower alphanumeric
characters. The tag <LI> is used to indicate actual list element.

<html>
<body> An Ordered List:
<h4>An Ordered List:</h4>
<ol type=”I” > 1. Coffee
<li>Coffee 2. Tea
<ol type=i>
<li>nest
3. Milk
<li>brue
</ol>
<li>Tea
<li>Milk
</ol>
</body></html>
The attribute used with ordered list are:-

Type=”A”(uppercase letters)
Type=”I”(uppercase roman letters)
Type=”a”(lowercase letters)
Type=”i”(lowercase roman letters)
Type=”1”(number)

20. <A>tag:-Anchor tag.


It is used to create links or hyperlinks. Links points to different files on the web.
The text or image enclosed between start tag <A> and end tag</A>is a link.
This link is clickable in a graphical browser. With most browsers the text within these tags is displayed in a different colour
and underlined.
Ex:- <A href=http://www.yahoo.com”> yahoosite</A>

<HREF>:-
The HREF attribute is used with <A> anchor tag. HREF refers to hypertext reference This attribute marks the anchor as the
start of a link to another document or resources or to a particular place in another document.
Ex:-
<A HREF=”http//www.rediff.com”> enter the Email ID </A>
in this above example “enter the Email ID “is the hyper text link to the web site indicated by URL specified. i.e. rediff.com

21. <IMG>:Image tag.


Its purpose is to include graphics images in the body of the Web page. There are two types of images:-
1. Inline images:- It inserted within a line of bodytext. If a image is large one, then the line becomes very tall.
2. Floating images:- It causes text to wrap around the image. The paragraph will flow around the images for several
lines, if the image is large.

To make image aa a separate paragraph, it is enclosed within paragraph elements.


e.g. <P><IMG src=”c:\my document\lion.jpg”></P>
Generally SRC and ALT attribute are always used with <IMG> tag. Attribute includes appropriate path of images file for
searching. For any browser, that is not displaying images, the alternate text contained inside the ALT attribute is displayed,
instead of the image.

e.g. <IMG SRC=”boat.jpg” Alt=”boat”>

<html>
<body>

<img border="0" src="/images/pulpit.jpg" width="30" height="28" />

</body>
</html>

<html>
<body>

<img src="constr4.gif" width="144" height="50" />

</body>
</html>

22. <Table> tag:-


The table can be created using <Table>…….</Table> tag. A table consist of row and columns.
The row is defined first and then cells or columns are inserted into the row from left to right.
1. <TR>:-table row tag.
The row is created by using start tag <TR>……and end tag </TR>. It creates a horizontal row of cells and contains table
headings or table data. Each use of <TR> tag creates a new row. A table must contain atleast one table data element or
table heading element. It includes attributes like ALIGN, BGCOLOR, and VALIGN.
<TR align=”center”>
<TR BGCOLOR=”red”>
<TR valign=”right”>
2. <TD>:-table data tag
This is used to insert data into the cell. <TD> creates individual cell. The number of cells in a row determines the number of
columns. It includes ALIGN, VALIGN, CELLSPACING, CELLPADDING etc. attributes. By default text in this cell align
left and centered vertically.

3. <TH> :-table heading tag.


This is table heading tag. <TH> is a start tag and </TH> is a end tag. This table is used to create individual column heading
of a table. By default text in this cell is bold and centered.
It has ALIGN, VALIGN, CELLSPACING, CELLPADDING etc. attribute to set the heading content(left, right, center).

<table border="1">
<tr> How it looks in a browser:
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
row 1, cell 1 row 1, cell 2
</tr>
<tr> row 2, cell 1 row 2, cell 2
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
<html>
<body>
<h4>Without cellspacing:</h4>
<table border="1"> Without cellspacing:
<tr>
<td>First</td>
<td>Row</td> First Row
</tr>
Second Row
<tr>
<td>Second</td>
<td>Row</td> With cellspacing:
</tr>
</table>
<h4>With cellspacing:</h4>
First Row
<table border="1" cellspacing="10">
<tr>
<td>First</td>
Second Row
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr></table></body></html>

3. COLSPAN and ROWSPAN are special attribute that can be used with <TH> and <TD> tags.
When one cell of the table span more than one row or column then attribute COLSPAN, ROWSPAN are used.
COLSPAN attribute can be used to make cell contents merge with another cell.
Ex:- This span two columns.
<TD COLSPAN=”2”>
<TH COLSPAN=”2”>
Ex:-The ROWSPAN attribute merge the rows.
<TD ROWSPAN=”2”>
<TH ROWSPAN=”2”>
<html>
<body> Cell that spans two columns:

<h4>Cell that spans two columns:</h4>


<table border="1"> Name Telephone
<tr> Bill Gates 555 77 854 555 77 855
<th>Name</th>
<th colspan="2">Telephone</th>
</tr> Cell that spans two rows:
<tr>
<td>Bill Gates</td>
<td>555 77 854</td> First Name: Bill Gates
<td>555 77 855</td> 555 77 854
</tr> Telephone:
</table> 555 77 855
<h4>Cell that spans two rows:</h4>
<table border="1">
<tr>
<th>First Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<th rowspan="2">Telephone:</th>
<td>555 77 854</td>
</tr>
<tr>
<td>555 77 855</td>
</tr>
</table>
</body>
</html>

4. <CAPTION>:- title to the table.


This tag is used to give title to the table, on the top or bottom of the table. The text appearing between start tag <CAPTION>
and end tag </CAPTION> is the title of the table,Which is displayed outside the table
<html><h4>
This table has a caption, This table has a caption, and a thick border:
and a thick border:</h4>
<table border="6">
<caption>My Caption</caption> My Caption
<tr>
<td>100</td> 100 200 300
<td>200</td> 400 500 600
<td>300</td>
</tr>
<tr>
<td>400</td> <td>500</td> <td>600</td></tr></table>
</body> Each table starts with a table tag. Each
</html> table row starts with a tr tag. Each
<html>
<body>
table data starts with a td tag.
<p> One column:
Each table starts with a table tag. 100
Each table row starts with a tr tag.
Each table data starts with a td tag.</p> One row and three columns:
<h4>One column:</h4> 100 200 300
<table border="1">
<tr> Two rows and three columns:
<td>100</td> 100 200 300
</tr>
</table> 400 500 600
<h4>One row and three columns:</h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
</table>
<h4>Two rows and three columns:</h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
<td>600</td>
</tr>
</table></body></html>

<html>
<body>
<h4>Cell backgrounds:</h4> Cell backgrounds:
<table border="1">
<tr> First Row
<td bgcolor="red"><fontcolor="white">First</td>
<td bgcolor="aqua"> <font color="red"><b>Row</b></td> Second Row
</tr>
<tr>
<td
background="bgdesert.jpg">
Second</td>
<td >Row</td>
</tr>
</table>
/body>
</html>

<html>
<body><table width="400" border="1">
<tr> Money spent on.... January February
<th align="left">Money spent on....</th>
<th align="right">January</th> Clothes $241.10 $50.20
<th align="right">February</th> Make-Up $30.00 $44.45
</tr>
<tr> Food $730.40 $650.00
<td align="left">Clothes</td> Sum $1001.50 $744.65
<td align="right">$241.10</td>
<td align="right">$50.20</td>
</tr>
<tr>
<td align="left">Make-Up</td>
<td align="right">$30.00</td>
<td align="right">$44.45</td>
</tr>
<tr>
<td align="left">Food</td>
<td align="right">$730.40</td>
<td align="right">$650.00</td>
</tr>
<tr>
<th align="left">Sum</th>
<th align="right">$1001.50</th>
<th align="right">$744.65</th>
</tr></table></body></html>

<html>
<body> Without cellpadding:
<h4>Without cellpadding:</h4>
<table border="1"> First Row
<tr>
<td>First</td> Second Row
<td>Row</td>
</tr> With cellpadding:
<tr>
<td>Second</td>
<td>Row</td>
</tr></table> First Row
<h4>With cellpadding:</h4>
<table border="1" cellpadding="10">
<tr>
Second Row
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr></table></body></html>

Write an appropriate code to display the following.


<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"> c++ data types
<li>Integer
<li>Char</ol> 1. built in
<li>floating 1. integral
<ol type="1">
<li>float 1. Integer
<li>Double</ol> 2. Char
<li>user defined 2. floating
<ol type="1"> 1. float
<li>structure 2. Double
<li>class
<li>union 3. user defined
<li>Enumeratation</ol> 1. structure
<li>derived 2. class
<ol type="1"> 3. union
<li>arrays 4. Enumeratation
<li>functions
<li>pointers </ol></body> </html> 4. derived
1. arrays
2. functions
3. pointers
<html><head><title> c++ data types</title></head>

<body><h2 align="center">c++ data types</h2> c++ data types


<ol type="A">
<li>built in A. built in
<ol type="I">
<li>integral
I. integral
<ul type="square">  Integer
<li>Integer  Char
<li>Char </ul> II. floating
<li>floating  float
<ul type="disc">
 Double
<li>float
<li>Double </ul> III. user defined
<li>user defined o structure
<ul type="circle"> o class
<li>structure o union
<li>class
o Enumeratation
<li>union
<li>Enumeratation </ul> IV. derived
<li>derived . arrays
<ol type="a"> a. functions
<li>arrays b. pointers
<li>functions
<li>pointers
</ol> </body> </html>
VBSCRIPT
What is script?
A script means a series of commands that will be executed by host environment. Scripting enables us to set and store
variables, perform operations on variables. Using scripting we can convert any static HTML page in active or dymanic
HTML page called as DHTML i.e. dynamic hyper text markup language. This is used to control different element of the page
including control frames and browser interface.

There are two famous scripting language.


1. VBSCRIPT 2. JAVASCRIPT

VBSCRIPT allows web author to write small scripts, that will be executed on users browsers rather than on the server.
Another importance of the VBSCRIPT is increased functionality introduced to the web author in the form of applet, plug in,
active X-Control and objects. Each of these things can be used to add extra functions and interactivity to the web page.

<SCRIPT> tag:-
The VBSCRIPT can be placed in <SCRIPT> start tag and </SCRIPT> end tag.
It contains attribute LANGUAGE=”VBSCRIPT” as shown below.
<SCRIPT LANGUAGE=”VBScript”>
Scripting code
</SCRIPT>

When browser executes <SCRIPT> Tag, it calls VBScript interpreter to compile and executes the code.
The code is placed in event handler but procedures can also be included.
Scripting allows to take control of contents of a page and manipulate them with the program.
1. sample of Script
<html>
output:-
<body>
Scripts in the body section are executed when the page is loading
<script language="vbscript">
Document. Write ("Scripts in the body section are executed when the page is loading")
</script>
</body>
</html>

2. script with background color.


<html>
<body bgcolor="red"text="yellow">
<script language="vbscript">
document.write("html!")
</script>
</body></html>

3. Script in body section.


<html>
<body>
<script type="text/vbscript">
document.write("<h1>Hello World!</h1>") Hello World!
document.write("<h2>Hello World!</h2>")
</script> Hello World!
</body>
/html>
4. Script in head section.
<html>
<head>
<script language="vbscript">
alert("Hello")
</script>
</head>
<body>
<p>
We usually use the head section for "functions".<BR>
The reason for this is to be sure that the script is loaded before the function is called.
</p>
</body>
</html>
output:-
We usually use the head section for "functions".
The reason for this is to be sure that the script is loaded before the function is called.

5. Using variable in script.


<html>
<body>
<script language="vbscript">
dim name Decimal InfoTech
name=" Decimal InfoTech”
document.write(name)
</script>
</body>
</html>

6. Using variable in script.


<html>
<body> My name is: Decimal Infotech
<script language="vbscript">
dim name
name="Decimal Infotech "
document.write("My name is: " & name)
</script>
</body>
</html>

7. Script using array.


<html>
<body bgcolor="C:\ganesha_by_awal.jpg"text="white">
<script language="vbscript">
dim famname(5)
famname(0)="Jan Egil"
famname(1)="Tove"
famname(2)="Hege"
famname(3)="Stale"
famname(4)="Kai Jim"
famname(5)="Borge"
for i=0 to 5
document.write(famname(i) & "<br />")
next
</script>
</body>
</html>

Question paper solved examples

Q1. Write exact output of the following HTML code with font specifications in brackets(M2002)

<html>
<body>
<h1>LIST OF BOOKS</h1></hr> LIST OF BOOKS
<ul type=”disc”>
<li>How to solve it by computer
<li>HTML in easy steps  How to solve it by computer
<li>C++ Programming  HTML in easy steps
</ul>  C++ Programming
<ol type=”1”>
<li>microprocessor programming 1. microprocessor programming
<li>Networking essentials
<li microcontrollers 2. Networking essentials
</ol> 3. microcontrollers
</body>
</html>

Q 2. Write a html code for a webpage display the following table.(oct2002)


Yesterday’s weather
City High Low Wind
Mumbai 33 24 West
Pune 34 25 South
Latur 32 20 South

<html><head><title>yesterdays weather</title></head>
<body>
<table border=”2”><caption>Yesterdays 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 3. Write the exact output of the following html code with font specification in brackets (Oct2003)

<html>
<title> Introduction</title>
COMPUTER SCIENCE
<body>
<h1><b>COMPUTER SCIENCE</b></h1>
<hr>
<u>SCHAUM’S OUTLINE SERIES</U>
<hr>
<h5>SEYMOUR LIPSCHUTZ</H5>
</BODY>
</html>

Q 4. write a html code using VBScript for designing a web page which greets “Good morning” if time is from 12:00am up to
12:00pm, else greets “Good Afternoon”.(M2004)

<html>
<head>

<script type="text/vbscript">
function greeting()
if time()>=#12:00:00AM# and time()<=#12:00:00PM# then
greeting="good morning"
elseif time()>=#1:00:00pM# and time()<=#04:00:00PM# then
greeting="good afternoon"
else
greeting="good night"
end if
end function
</script>
</head>

<body>
<script type="text/vbscript">
document.write("My favorite time is " & greeting())
</script>
</body>

</html>

Q 5 Write HTML code for the follo wing.(M-2005)


<html>
<head>
<title>
computer science</title>
</head>
<body>
<table border="3">
<tr>
<th rowspan="2">computer<br>science</th>
<td>paper I</td>
<td>paper II</td>
<td>TOTAL</td>
</tr> computer paper I paper II TOTAL
<tr> science 100 100 200
<td>100</td>
<td>100</td>
<td>200</td>
</tr>
</table>
</body>
</html>

Q 6 Write HTML code for the follo wing.(M-2004)

<html><head><title>computer science</title></head>
<body>
<table border="3">
<tr width="100%">
<th rowspan="2" colspan="2" width="25%"> </th>
<th colspan="3" align="center" width="75%">year</th>
</tr>
<tr>
<th align="center">1999</th>
<th align="center">2000</th>
<th align="center">2001</th>
</tr>
<tr >
<th rowspan="2" width="12%" align="center">sales</th>
<th align="center">Units</th>
<td align="center">300</td>
<td align="center">750</td> year
<td align="center">1,200</td>
1999 2000 2001
</tr>
<tr> Units 300 750 1,200
<th align="center">Income</th> sales
<td align="center">3000</td> Income 3000 7500 12000
<td align="center">7500</td>
<td align="center">12000</td>
</tr></table></body></html>

Q 7Write html code for displaying web page containing a six celled table as shown below.

<html>
<head>
<title>celled table</title></head> sachin saurav laxman
<body> first second third
<table border=”2” cellspacing=”50”>
<tr>
<td>sachin</td>
<td>saurav</td>
<td>laxman</td>
</tr>
<tr>
<td>first</td>
<td>second</td>
<td>third</td>
</tr> </table></body></html>

Q 8 write the html code for the following.

<html><head><title>computer science</title></head>
<body><table border="3">
<tr width="100%"> SCIENCE
<th colspan="3" width="100%"> SCIENCE </th>
</tr> FY BSc SY BSc TY BSc
<tr>
<th align="center"> FY BSc </th>
300 100 25
<th align="center"> SY BSc </th> ARTS
<th align="center"> TY BSc </th>
</tr> FY BA SY BA TY BA
<tr> 200 150 40
<td align="center"> 300 </td>
<th align="center"> 100 </td> COMMERCE
<td align="center"> 25 </td> </tr>
<tr width="100%">
FY BCOM SY BCOM TY BCOM
<th colspan="3" width="100%"> ARTS </th></tr> 300 70 50
<tr>
<th align="center"> FY BA </th>
<th align="center"> SY BA </th>
<th align="center"> TY BA </th></tr>
<tr>
<td align="center"> 200 </td>
<th align="center"> 150 </td>
<td align="center"> 40 </td> </tr>
<tr width="100%">
<th colspan="3" width="100%"> COMMERCE </th></tr>
<tr>
<th align="center"> FY BCOM </th>
<th align="center"> SY BCOM </th>
<th align="center"> TY BCOM </th></tr>
<tr>
<td align="center"> 300 </td>
<td align="center"> 70 </td>
<td align="center"> 50 </td></tr></table></body></html>

You might also like