HTML Lab File PDF
HTML Lab File PDF
Write HTML code to create a basic web page consisting of various HTML tags
Code:
<!DOCTYPE html>
<html>
<head>
<title>GAME WORLD </title>
</head>
<body>
OUTPUT
EXPERIMENT NO. -2 DATE – 23-03-2022
Write an HTML code to design a page containing text, in form of paragraphs given
suitable heading style.
Code:
<html>
<head>
<title>PRASHANT KUMAR</title>
</head>
<body>
<p align=”Justify”>My name is Prashant kumar from Masters of Computer Application Second Year. Iam
from Bihar Patna.
<h1 style="font-size:5vw" align="center"><i><strong><u>William
Shakespeare</i></u></strong></h1></p>
William Shakespeare (bapt. 26 April 1564 – 23 April 1616)[a] was an English playwright, poet and actor.
He is widely regarded as the greatest writer in the English language and the world's greatest
dramatist.[2][3][4] He is often called England's national poet and the "Bard of Avon" (or simply "the
Bard").[5][b] His extant works, including collaborations, consist of some 39 plays,[c] 154 sonnets, three
long narrative poems, and a few other verses, some of uncertain authorship. His plays have been
translated into every major living language and are performed more often than those of any other
playwright.[7] His works continue to be studied and reinterpreted.</p> <p>Shakespeare was born and
raised in Stratford-upon-Avon, Warwickshire. At the age of 18, he married Anne Hathaway, with whom he
had three children: Susanna and twins Hamnet and Judith. Sometime between 1585 and 1592, he began a
successful career in London as an actor, writer, and part-owner of a playing company called the Lord
Chamberlain's Men, later known as the King's Men. At age 49 (around 1613), he appears to have retired
to Stratford, where he died three years later. Few records of Shakespeare's private life survive; this has
stimulated considerable speculation about such matters as his physical appearance, his sexuality, his
religious beliefs and whether the works attributed to him were written by others. </p>
</body>
</html>
OUTPUT-
EXPERIMENT – 3 DATE- 06-04-2022
<html>
<style>
table, th, td {
border:1px solid black;
}
</style>
<body>
<h2>A basic HTML table</h2>
<table style="width:100%">
<tr>
<th>Company</th>
<th>Cars</th>
<th>Model</th>
</tr>
<tr>
<td>BMW</td>
<td>Black Edition</td>
<td>Bmw 2x</td>
</tr>
<tr>
<td>Audi</td>
<td>Grey Edition</td>
<td>GLA 3004</td>
</tr>
</table>
</body>
</html>
OUTPUT-
EXPERIMENT -4 DATE- 04-05-2022
WRITE AN HTML CODE TO CREATE A FORM.
CODE-
<!DOCTYPE html>
<html>
<body>
<h2>HTML Forms</h2>
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="PRASHANT"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="KUMAR"><br><br>
<input type="submit" value="Submit">
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called
"/action_page.php".</p>
</body>
</html>
EXPERIMENT – 5 DATE- 16-05-2022
<body>
<div class="w3-container">
<h2>Basic Table</h2>
<p>To create a basic table</p>
<table class="basic-table">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Belongs to</th>
</tr>
<tr>
<td>Prashant</td>
<td>Kumar</td>
<td>Bihar</td>
</tr>
<tr>
<td>Sonia</td>
<td>Kumari</td>
<td>UP</td>
</tr>
<tr>
<td>Satyam</td>
<td>Kr.jha</td>
<td>Delhi</td>
</tr>
</table>
</div>
</body>
</html>
Experiment- 6 Date- 30-05-2022
<html>
<title>PRASHANT.CSS</title>
<link rel="stylesheet">
<body>
<div class="w3-container">
<h2>Borders</h2>
<p>THIS IS MY BORDER.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
EXPERIMENT- 7 DATE- 30-05-2022
<html>
<title>PRASHANT.CSS</title>
<body>
<div class="w3-container">
<h2>Dropdown Button</h2>
<p>Move the mouse over the button to open the dropdown content.</p>
<div class="w3-dropdown-hover">
</div>
</div>
</div>
</body>
</html>
EXPERIMENT- 8 DATE- 31-05-2022
Code
<html>
<head>
<script type="text/javascript">
<!--
function sayHello() {
alert("Hello World")
//-->
</script>
</head>
<body>
</body>
</html>
EXPERIMENT – 9 DATE- 13-06-2022
<head>
<!--
function WriteCookie()
now.setMonth( now.getMonth() + 1 );
document.cookie="name=" + cookievalue;
//-->
</script>
</head>
<body>
</form>
</body>
</html>
EXPERIMENT – 10 DATE- 13-06-2022
<head>
<!--
function myFunc() {
var a = 100;
var b = 0;
try {
if ( b == 0 ) {
else {
var c = a / b;
catch ( e ) {
alert("Error: " + e );
//-->
</script>
</head>
<body>
<form>
</form>
</body>
</html>