0% found this document useful (0 votes)
17 views49 pages

HTML

The document contains 20 questions about HTML tags and forms. Each question provides HTML code for a task and asks the reader to output the result. The questions cover topics like headings, paragraphs, images, lists, tables, forms, and links. The document aims to teach HTML through practical examples and exercises.

Uploaded by

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

HTML

The document contains 20 questions about HTML tags and forms. Each question provides HTML code for a task and asks the reader to output the result. The questions cover topics like headings, paragraphs, images, lists, tables, forms, and links. The document aims to teach HTML through practical examples and exercises.

Uploaded by

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

PRACTICAL FILE

OF

HTML

Submitted To: Submitted by:


Miss Geetika Arora Name:………..
(Asst.prof.in CS dept.) Roll No:………
Class:………...
Q.1 Write a program to display welcome in html.
<html>
<head>
<title>introduction</title>
<body>
welcome to html
</body>
</html>
Output:

Q.2 Write a program to apply Background color.


<html>
<head>
<title>font</title>
<body bgcolor=pink>
<h1>Internet</h1>internet is the coined by two word inter and net.
inter means interconnection and network. internet is a network of
networks and html is stands for hyper text markup language.html
is the language used for creating web pages. it provides a number
of commands that can be used to place and format text picture
and sound on web pages. these commands are known as tags or
markup.
</body>
</html>

Output:

Q.3 Write a program to implement heading tag in html.


<html>
<head>
<title>heading tag</title>
<body>
<h1>this tag is used to apply headings</h1>
<h2>this tag is used to apply headings</h2>
<h3>this tag is used to apply headings</h3>
<h4>this tag is used to apply headings</h4>
<h5>this tag is used to apply headings</h5>
<h6>this tag is used to apply headings</h6>
</body>
</html>

Output:

Q.4 Write a program to implement paragraph tag in html.


<html>
<head>
<title>
paragraph</title>
<body >
<p align=center>
html is stands for hyper text markup language.html is the language used
for creating web pages. it provides a number of commands that can be
used to place and format text picture and sound on web pages. these
commands are known as tags or markup.</p>
<p align=left>
html is stands for hyper text markup language.html is the language used
for creating web pages. it provides a number of commands that can be
used to place and format text picture and sound on web pages. these
commands are known as tags or markup.</p>
<p align=right>
html is stands for hyper text markup language.html is the language used
for creating web pages. it provides a number of commands that can be
used to place and format text picture and sound on web pages. these
commands are known as tags or markup.</p>
</body>
</html>
Output:
Q.5 Write a program to implement marquee tag in html.
<html>
<head>
<title>
marquee
</title>
<body bgcolor=pink>
<h1><marquee behavior=alternate>
hypertext markup language
</h1></marquee>
html is stands for hyper text markup language.html is the language used
for creating web pages. it provides a number of commands that can be
used to place and format text picture and sound on web pages. these
commands are known as tags or markup.
</body>
</html>

Output:
Q.6 Write a program to implement font tag in html.
<html>
<head>
<title>font</title>
<body bgcolor=pink>
<h1><font color=orange font size=8 font
face=ravie>Internet</font></h1>
<font color=blue font size=5 font face=ravie>
internet is the coined by two word inter and net. inter menans
interconnection ans net means
network. internet is a network of networks and
html is stands for hyper text markup language.html is the language used
for creating web pages.
it provides a number of commands that can be used to place and format
text picture and sound on
web pages. these commands are known as tags or markup.
</body>
</html>

Output:
Q.7 Write a program to insert image in html.
<html>
<head>
<title>img</title>
</head>
<body>
<img src="C:\Users\Public\Pictures\Sample Pictures/koala.jpg"></img>
</body>
</html>
Output:
Q.8 Write a program to create order list in html.
<html>
<head>
<title>ordered list</title>
</head>
<body>
<h1><center>Input device</center></h1>
<ol type=1>
<li>Mouse
<li>Keyboard
<li>Joystick
<li>Lightpen
<li>Scanner</li></ol>
<h2><center>Output device</center></h2>
<ol type=A>
<li>Monitor
<li>Speaker
<li>Printer
<li>Dot matrix printer
<li>Laser printer</li></ol>
</body> </html>
Output:

Q.9 Write a program to create definition list in html.


<html>
<head>
<title>defination list</title>
</head>
<dl>
<dt>Computer
<dd>computer is an electronic device which takes the
input process it and give the output
<dt>Html
<dd>it stands hyper text markup language.html is the
language used for creating web pages
</dl>
</body>
</html>

Output:

Q.10 Write a program to create nested list in html.


<html>
<head>
<title>nested list</title>
</head>
<body>
<ol type=1>
<li>Input device
<ul type=circle>
<li>Scanner
<li>Keyboard
<li>Mouse
</ul>
<li>output device
<ul type=disc>
<li>Dot matrix printer
<li>Monitor
<li>Laser printer
</ul>
</ol>
</body>
</html>

Output:
Q.11 Write a program to create unordered list in html.
<html>
<head>
<title>unordered list</title>
</head>
<body>
<h1><center>Input device</center></h1>
<ul type=circle>
<li>Mouse
<li>Keyboard
<li>Joystick
<li>Lightpen
<li>Scanner</li></ol>
<h2><center>Output device</center></h2>
<ul type=disc>
<li>Monitor
<li>Speaker
<li>Printer
<li>Laser printer
<li>Dot matrix printer</li></ol>
</body>
</html>

Output:
Q.12 Write a program to create a table in html.
<html>
<head>
<title>table</title>
</head>
<body>
<table table border=10 height=200 width=50%>
<caption><b><i>bsc(final year class list)<i></font></b></caption>
<tr align=center>
<th>rollno</th>
<th>name</th>
<th>class</th>
<th>address</th>
<th>ph.no.</th>
</tr>
<tr align=center>
<td>1</td>
<td>pinki</td>
<td>bsc(c.s.)</td>
<td>hodal</td>
<td>1234567890</td>
</tr>
<tr align=center>
<td>2</td>
<td>pooja rani</td>
<td>bsc(c.s.)</td>
<td>palwal</td>
<td>345678312</td>
</tr>
<tr align=center>
<td>3</td>
<td>neha kaushik</td>
<td>bsc(c.s.)</td>
<td>fbd</td>
<td>347657890</td>
</tr>
<tr align=center>
<td>4</td>
<td>kumkum kaushik</td>
<td>bsc(c.s.)</td>
<td>kosi</td>
<td>456783920</td>
</tr>
<tr align=center>
<td>5</td>
<td>vansita</td>
<td>bsc(c.s.)</td>
<td>hodal</td>
<td>56745342514</td>
</tr>
</table>
</body>
</html>
Output:

Q.13 Write a program to apply colspan and rowspan


on a table.
<html>
<head>
<title>student data</title>
</head>
<body>
<table border=13 height=200 width=50%>
<tr>
<th colspan=4>result table
</th>
<tr>
<th>class</th>
<th>rollno</th>
<th>name</th>
<th>marks</th>
</tr>
<tr>
<td rowspan=3>b.sc 1st yr</td>
<td>1101</td>
<td>neha</td>
<td>90</td>
</tr>
<tr>
<td>1102</td>
<td>kumkum</td>
<td>85</td>
</tr>
<tr>
<td>1103</td>
<td>shilky</td>
<td>99</td>
</tr>
<tr>
<td rowspan=3>b.sc 2nd yr</td>
<td>1201</td>
<td>arti</td>
<td>88</td>
</tr>
<tr>
<td>1202</td>
<td>pinki</td>
<td>87</td>
</tr>
<tr>
<td>1203</td>
<td>poonam</td>
<td>98</td>
</tr>
</table>
</body>
</html>
Output:

Q.14 Write a program to implement internal linking in


html.
<html>
<head>
<title>internal linking</title>
</head>
<body>
<center>
iwd<br><br>
chapter-1<br><br>
chapter-2<br><br>
chapter-3<br><br>
chapter-4<a name="c4"></a><br><br>
chapter-5<br><br>
chapter-6<br><br>
chapter-7<br><br>
chapter-8<br><br>
chapter-9<br><br>
chapter-10<br><br>
<a href="#c4">
goto chapter-4</a>
</body>
</html>
Output:
Q.15 Write a program to implement e-mail linking in
html.
<html>
<head>
<title>e-mail linking</title>
</head>
<body>
<a href="[email protected]">
email me</a>
</body>
</html>
Output:

Q.16 Write a program to perform external linking in


html.
<html>
<head>
<title> external linking demo</title>
</head>
<body>
<a href="file:///C:/Users/irshad/Desktop/ol.html"> click me</a>
</body>
</html>
Output :

Output 2(Linked file)


Q.17 Write a program to create a text box by using html
form.
<html>
<head>
<title>form</title>
</head>
<body>
<form>
<b>NAME<input type="text" name="text1" size=30><br><br>
FATHER'S NAME<input type="text" name="text2"
size=30><BR><BR>
CITY<input type="text" name="text3" size=30><BR><BR>
ADDRESS<input type="text" name="text4" size=30><BR><BR>
PHONE NO<input type="text" name="text5" size=30><BR><BR>
</form>
</body>
</html>

Output:

Q.18 Write a program to create a password by using in html form.


<html>
<head>
<title>form</title>
</head>
<body>
<form>
<b>NAME<input type="text" name="text1" size=30><br><br>
FATHER'S NAME<input type="text" name="text2"
size=30><BR><BR>
CITY<input type="text" name="text3" size=30><BR><BR>
ADDRESS<input type="text" name="text4" size=30><BR><BR>
PHONE NO<input type="text" name="text5" size=30><BR><BR>
PASSWORD<input type="password" name="p1" size=30><br><br>
</form>
</body>
</html>
Output:
Q.19 Write a program to create a radio button by using html
form.
<html>
<head>
<title>form</title>
</head>
<body>
<form>
<b>NAME<input type="text" name="text1" size=30><br><br>
FATHER'S NAME<input type="text" name="text2"
size=30><BR><BR>
CITY<input type="text" name="text3" size=30><BR><BR>
ADDRESS<input type="text" name="text4" size=30><BR><BR>
PHONE NO<input type="text" name="text5" size=30><BR><BR>
PASSWORD<input type="password" name="p1"
size=30><br><br>
COURSE AVAILABLE:<br><br>
BSC<input type="RADIO" name=R1 ><br><br>
BCA<input type="RADIO" name=R1 ><br><br>
BBA<input type="RADIO" name=R1 ><br><br>
MSC<input type="RADIO" name=R1 ><br><br>
MBA<input type="RADIO" name=R1 ><br><br>
MCA<input type="RADIO" name=R1 ><br><br>
</form>
</body> </html>
Output:
Q.20 Write a program to create check box by using html
form.
<html>
<head>
<title>form</title>
</head>
<body>
<form>
<b>NAME<input type="text" name="text1" size=30><br><br>
FATHER'S NAME<input type="text" name="text2"
size=30><BR><BR>
ADDRESS<input type="text" name="text4" size=30><BR><BR>
PHONE NO<input type="text" name="text5" size=30><BR><BR>
PASSWORD<input type="password" name="p1"
size=30><br><br>
COURSE AVAILABLE:<BR><BR>
BSC<input type="RADIO" name=R1 >
BCA<input type="RADIO" name=R1 >
BBA<input type="RADIO" name=R1 >
MSC<input type="RADIO" name=R1 >
MBA<input type="RADIO" name=R1 >
MCA<input type="RADIO" name=R1 ><br><br>
SUBJECT OBTAIN:<br><br>
ENGLISH<input type="CHECKBOX" name=c1><br><br>
HINDI<input type="CHECKBOX" name=c2><br><br>
MATH<input type="CHECKBOX" name=c3><br><br>
COMPUTER<input type="CHECKBOX" name=c4><br><br></b>
</form>
</body>
</html>

Output:
Q.21 Write a program to create a drop down list by using
html.
<html>
<head>
<title>form</title>
</head>
<body>
<form>
<b>NAME<input type="text" name="text1" size=30><br><br>
FATHER'S NAME<input type="text" name="text2"
size=30><BR><BR>
ADDRESS<input type="text" name="text4" size=30><BR><BR>
PHONE NO<input type="text" name="text5" size=30><BR><BR>
PASSWORD<input type="password" name="p1"
size=30><br><br>
COURSE AVAILABLE:<br><br>
BSC<input type="RADIO" name=R1 >
BCA<input type="RADIO" name=R1 >
BBA<input type="RADIO" name=R1 >
MSC<input type="RADIO" name=R1 >
MBA<input type="RADIO" name=R1 >
MCA<input type="RADIO" name=R1 ><br><br>
SUBJECT OBTAIN:<br><br>
ENGLISH<input type="CHECKBOX" name=c1>
HINDI<input type="CHECKBOX" name=c2>
MATH<input type="CHECKBOX" name=c3>
COMPUTER<input type="CHECKBOX" name=c4><br><br>
SELECT QUALIFICATION:<BR><BR>
<select name="qual">
<option value="10th">10th
<option value="12th">12th
<option value="bsc">B.sc
<option value="B.com">B.com
</select></b>
</form>
</body>
</html>
Output:
Q.22 Write a program to create Admission form in html.
<html>
<head>
<title>form</title>
</head>
<body>
<center><b><i><font size=8>ADMISSION
FORM</font></b></i></center>
<form>
<b>NAME<input type="text" name="text1" size=30>
FATHER'S NAME<input type="text" name="text2"
size=30><BR><BR>
CITY<input type="text" name="text3" size=30>
ADDRESS<input type="text" name="text4" size=30><BR><BR>
PHONE NO<input type="text" name="text5" size=30>
PASSWORD<input type="password" name="p1"
size=30><br><br>
E-MAIL ID<input type="TEXT" name="p1" size=30><br><br>
DATE OF BIRTH<input type="TEXT" name="p1"
size=30><br><br>
SELECT COURSE:<br><br>
<SELECT NAME="AUAL">
<OPTION VALUE="SELECT">SELECT
<OPTION VALUE="B.SC">B.SC
<OPTION VALUE="B.SC">B.COM
<OPTION VALUE="B.SC">BBA
<OPTION VALUE="B.SC">BCA
<OPTION VALUE="B.SC">MBA
<OPTION VALUE="B.SC">M.SC
<OPTION VALUE="B.SC">MCA
</SELECT><BR><BR>
GENDER:
MALE<input type="RADIO" NAME="R1">
FEMALE<input type="RADIO" NAME="R1"><BR><BR>
NATIONALITY:
INDIAN<INPUT TYPE="RADIO"NAME="R2">
OTHERS<input type="RADIO" NAME="R2"><BR><BR>
SUBJECT OBTAIN:<br><br>
ENGLISH<input type="CHECKBOX" name=c1>
HINDI<input type="CHECKBOX" name=c2>
MATH<input type="CHECKBOX" name=c3>
COMPUTER<input type="CHECKBOX" name=c4>
<BR><BR>
<center>
<INPUT TYPE="SUBMIT" VALUE="SUBMIT">
<INPUT TYPE="RESET" VALUE="RESET"></center></B>
</form>
</body>
</html>
Output:
Q.23 Write a program to create inline style sheet in css.
<html>
<head>
<title>demo of inline sheet</title>
</head>
<body>
<p style="color:red; font-size:25px;"> shivank goel</p>
</body>
</html>

Output:
Q.24 Write a program to create external sheet by using CSS.
*/html file*/
<html>
<head>
<link rel="stylesheet" type="text/css" href="external.css">
</head>
<body>
<p>External stylesheet
-in this method we create seprate css file along with html file .</p>
</body>
</html>

*/CSS file/*
p{
color: red;
font-size: 25px;
}
Output:
Q.25 Write a program to implement internal sheet by using
CSS.
<html>
<head>
<title>CSS</title>
<style>
P
{
color:red; font-size:50px;
}
</style>
</head>
<body>
<h1><center>INTERNAL LINKING</h1></center>
<p>css stands for cascading style sheet</p>
<p>it is used to providing more customized web pages</p>
<p>almost all web brower support css</p>
</body>
</html>
Output:

Q.26 Write a program to create a table in CSS.


/*CSS File(s14.css)*/
table,th,td
{
border:1.5px solid black:
}
table
{
width:100%
}
th
{
height:50px:
}
td
{
text-aligh:center;
}
th
{
background-color:black;
color:white;
}
/*HTML File*/
<html>
<head>
<link rel="stylesheet" type="text/css" href="s14.css">
<title>table demo</title>
</head>
<body>
<center>
<b>m.k.m colleges for girls,hodal</b><br><br>
<table>
<tr>
<th>name</th>
<th>class</th>
<th>marks</th>
</tr>
<tr align=center>
<td>rakhi</td>
<td>b.sc</td>
<td>78</td>
</tr>
<tr align=center>
<td>mamta</td>
<td>b.sc</td>
<td>85</td>
</tr>
</table>
</center>
</body>
</html>
Output:

Q.27 Write a program to implement custom background


and color in CSS.
<html>
<head>
<title>background color</title>
</head>
<body>
<p style="background-color: yellow;">
this text has background color
</p>
</body>
</html>
Output:

Q.28 Write a program to put graphics on a web page by


using CSS.
<html>
<head>
<style>
body{
background-image:url("C:\Users\Public\Pictures\Sample Pictures\
Desert.jpg");} </style>
<body>
<h1>hello world</h1>
</body>
</head>
</html>
Output:

You might also like