Lab
Lab
Lab File
SEMESTER: 2
NAME OF FACULTY: MONA CHOUDHARY
Lab experiment : 1
Objective : Pre-tags
Html code:
<html>
<head>
<title> Pre tag </title>
</head>
<body>
<h1> Basic of html </h1>
</body>
</html>
Lab experiment : 2
Objective : Font face, size and color
Html code:
<html>
<body>
<font face="algerian" size="7" style ="color:green"> WELCOME </font> <br>
<font size="6" style="color: red"> WELCOME </font> <br>
<font size="3" color="green"> WELCOME </font> <br>
<font size="4" color="pink"> WELCOME </font> <br>
<font size="5" color="yellow"> WELCOME </font> <br>
</body>
</html>
Lab experiment : 3
Objective: Write a program to illustrate comment, h1-h6 and div tag.
Program : (html code)
<html>
<head>
<title>
Illustrating comment , h1-h6 div tags
</title>
<body>
<div style="color: #00FF00">
<h1 align="center"> This is h1 tag text with center aligned </h1>
<h2 align="left"> This is h2 tag with left aligned </h2>
<h3 align="right"> This is h3 tag aligned right<h/3>
</div>
<h4> This is h4 tag without alignmenrt </h4>
<h5> This is h5 tag text without alignment</h5>
<h6> This is h5 tag text without alignment</h6>
</body>
</html>
Lab experiment : 4
Objective: Write a program to illustrate text formatting tags.
Program : (html code)
<html>
<body>
<title> Text tags</title>
<body>
<center>
<h1> To illustrate text formatting tags </h1>
<p> This is <i>italized</i></p>
<p> This is <u>underlined</u></p>
<p> This is <em>emphasized</em></p>
<p> This is <strong>strong text</strong></p>
<p> This is <s>striked</s></p>
<p> This is <i>italized</i></p>
<p> This is <code>computer code</code></p>
<p> This is <sup>superscript</sup></p>
<p> This is <sub>subscript</sub></p>
<p> This is <big>big text</big></p>
<p> This is <small>small</small></p>
</center>
</body>
</html>
Lab experiment : 5
Objective: Write a program to illustrate ordered list tags.
Program : (html code)
<html>
<head>
<title> Oder list tag </title>
<head>
<body>
<h3 align="center" style="color:red"> To illustrate oder list tags </h3>
<h4> Numbered list:</h4>
<ol>
<li>Apples</li>
<li>Banana</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
<h4> Uppercase letters list:</h4>
<ol type="A">
<li> Apples</li>
<li>Bananas</li>
<li>Oranges</li>
<li> Lemons</li>
</ol>
<h4> Lowercase letters list:</h4>
<ol type="a">
<li> Apples</li>
<li>Bananas</li>
<li>Oranges</li>
<li> Lemons</li>
</ol>
<h4> Roman numbers list:</h4>
<ol type="I">
<li> Apples</li>
<li>Bananas</li>
<li>Oranges</li>
<li> Lemons</li>
</ol>
<h4> Lowercase roman number list:</h4>
<ol type="i">
<li> Apples</li>
<li>Bananas</li>
<li>Oranges</li>
<li> Lemons</li>
</ol>
</body>
</html>
Lab experiment : 6
Objective: Write a program to illustrate unordered list tags.
Program : (html code)
<html>
<title> Unordered list</title>
<body>
<h3 align="center"> To illustrate unordered list tags</h3>
</body>
</html>
Lab experiment : 7
Objective: Write a program to illustrate Nested and Definition tag .
Program : (html code)
<html>
<head>
<title> Nested and definition list</title>
</head>
<body>
<h3 align="center"> To illustrate nested and definition tag list tags</h3>
<h4>An ordered nested list</h4>
<ol>
<li>Coffee</li>
<li>tea</li>
<ol type="a">
<li>Black tea</li>
<li>Green tea</li>
<ol type="i">
<li>China</li>
<li>Africa</li>
</ol>
</ol>
<li>milk</li>
</ol>
<h4> A definition list : </h4>
<dl>
<dt>Bangalore</dt>
<dd> capital city of karnataka</dd>
<dt>Mumbai</dt>
<dd>capital city of maharashtra</dd>
</dl>
</dl>
</body>
</html>
Lab experiment : 8
Objective: Write a program for image tag.
Program : (html code)
<html>
<head>
<title> Image tag</title>
<body>
<h3 align="center" style="color:red" > To illustrate image tags </h3>
<p>
<img src="clouds.jpg" align="right" "width="300" height="200"> This image is
aligned right
</p><br><br><br><br><br><br>
<p>
<img src="clouds.jpg" align="left" "width="300" height="200"> This image is
aligned left
</p><br><br><br><br><br><br><br><br><br><br>
<hr>
<p>
This image is aligned center with the text
<img src="clouds.jpg" align:"middle" "width="300" height="200">
</p><br><br><br><br><br><br>
<p>
<hr>
This image is aligned bottom
<img src="clouds.jpg" align="bottom" "width="300" height="200">
</p><br><br><br><br><br><br>
<p>
<hr>
This image is aligned top with text
<img src="clouds.jpg" align="top" "width="300" height="200">
</p><br><br><br><br><br><br>
</body>
</head>
</html>
Lab experiment : 9
Objective: Write a program for hyperlink tag.
Program : (html code)
<html>
<head>
<title> Link tag</title>
</head>
<body>
<h3 align="center" style=colr:"red"> To illustrate link tags </h3> <hr>
Text as a link / hyperlink to another page : <a href="page1.html"> click here!!!
</a> <hr>
<tr><td></td>
<th> Name</th>
<th> Age</th>
<th> Telephone</th>
</tr>
<tr>
<th> Student 1</td>
<td> Radha</td>
<td> 20</td>
<td> 123456789</td>
</tr>
<tr>
<th> Student 2</th>
<td> Geetha Bhar</td>
<td> 21 </td>
<td> 123456789</td>
</tr>
</table>
<h4> Cell that span too columns</h4>
<table border="4">
<tr>
<th>Name</th>
<th colspan="2"> Telephone </th>
</tr>
<tr>
<td>Radha</td>
<td>456789</td>
<td>987456</td>
</tr>
</table>
<h4> Cell that span too columns</h4>
<table border="10">
<tr>
<th>Name</th>
<td> Radha</td>
</tr>
<tr>
<th rowspan="2">Telephone</th>
<td>456789</td>
</tr>
<tr>
<td>987456</td>
</tr>
</table>
</center>
</body>
</html>
Lab experiment : 11
Objective: Write a program for form tag.
Program : (html code)
<html>
<head>
<title> Form </title>
</head>
<body>
<center>
<h3 align="center"> To illustrate form based tags </h3> <hrcolor="red"><form
action="">
Lab experiment : 13
Objective: Write a program for CSS demo tag.
Program : (html code)
<html>
<head>
<title> CSS demo</title>
</head>
<style type="text/css">
body{ background-color:red}
h1{color:orange;text-align:center;}
p{font-family:"Timenewroman";font-size:20px}
</style>
<body>
<h1>CSS EXAMPLE color orange</h1>
<p>This is a paragraph font times new roman</p>
</body>
</html>
Lab experiment : 14
Objective: Write a program for Embedded video tag.
Program : (html code)
<html>
<head>
<title> Embedded multipedia</title>
</head>
<body>
<center>
<h1>
Here is a video embedded on this webpage</h1><br>
<iframe src="donut.mp4" type="video" height="200" width="200">
</iframe>
</center>
</body>
</html>
Lab experiment : 15
Objective: Write a program for validate java tag.
Program : (html code)
<html>
<head>
<script>
function validateForm() {
var x = document.forms["myForm"]["fname"].value;
if (x == "") {
alert("Name must be filled out");
return false;
}
}
</script>
</head>
<body>
</body>
</html>