0% found this document useful (0 votes)
10 views11 pages

HTML Programs

Uploaded by

dhanudhanush1803
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)
10 views11 pages

HTML Programs

Uploaded by

dhanudhanush1803
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

PART B(HTML PROGRAMS)

1. Design a page having suitable background colour and text colour with title “My
First Webpage” using all the attributes of the Font tag
<html>

<head>

<title>MyFirstWebPage</title>

</head>

<body bgcolor="lightblue">

<center>

<font face="Arial" size="6"color="darkblue">MyFirstWebPage</font>

</center>

<p>

<font face="Verdana" size="4"color="black">

Welcome to my first webpage. This is a demonstration of using the font tag.

</font>

</p>

</body>

</html>

OUTPUT:

2.Write HTML code to design a page containing some text in a paragraph by giving
suitable heading style
<html>
<head>

<title>Simple Page</title>

</head>

<body>

<h1>This is a Heading</h1>

<p>This is a simple paragraph of text.</p>

</body>

</html>

OUTPUT

3.Write a HTML program for the demonstration of Lists.


a. Unordered List
b. Ordered List
<html>
<head>
<title>List Demonstration</title>
</head>
<body>
<h2>Unordered List</h2>
<ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
</ul>
<h2>Ordered List</h2>
<ol>
<li>FirstItem</li>
<li>SecondItem</li>
<li>ThirdItem</li>
</ol>
</body>
</html>
OUTPUT

4 Write a HTML program for demonstrating Hyperlinks. a.


Navigation from one page to another.
b. Navigation within the page
<html>

<head>

<title>Hyperlink Demonstration</title>

</head>

<body>

<!-- Navigation to another page-->

<h2> Navigation to Another Page</h2>

<a href = "https://www.geeksforgeeks.org/" >Go to Geeks for Geeks website</a>

<!-- Navigation within the same page-->

<h2> Navigation With in the Same Page</h2>

<a href="#section1">Go to Section1</a>

<a href="#section2">Go to Section2</a>

<!--Content for internal navigation -->

<h3 id="section1">Section1</h3>

<p>Thisis Section1.</p>

<a href="#top">BacktoTop</a>

<h3 id="section2">Section2</h3>
<p>This is Section2.</p>

<a href="#top">Back to Top</a>

</body>

</html>

OUTPUT

5.Write a HTML program for time-table using tables

<html>

<head>

<title>Class Time table</title>

</head>

<body>

<h1>Class Time table</h1>

<table border="1"cellspacing="0" cellpadding="10">

<tr>

<th>Day</th>

<th>9:00-10:00AM</th>

<th>10:00-11:00AM</th>

<th>11:00-12:00PM</th>

<th>12:00-1:00PM</th>

<th>1:00-2:00PM</th>

</tr>

<tr>

<td>Monday</td>
<td>Math</td>

<td>English</td>

<td>Physics</td>

<td>Biology</td>

<td>computer science</td>

</tr>

<tr>

<td>Tuesday</td>

<td>History</td>

<td>Math</td>

<td>English</td>

<td>Chemistry</td>

<td>computer science</td>

</tr>

<tr>

<td>Wednesday</td>

<td>Biology</td>

<td>History</td>

<td>Math</td>

<td>English</td>

<td>computer science</td>

</tr>

<tr>

<td>Thursday</td>

<td>Chemistry</td>

<td>Biology</td> <td>Computer Science</td>

<td>Math</td>

<td>physical Education</td>
</tr>

<tr>

<td>Friday</td>

<td>Physical Education</td>

<td>Physics</td>

<td>English</td>

<td>History</td>

<td>computer science</td>

</tr>

</table>

</body>

</html>

OUTPUT

6 Write a HTML program to develop a static Registration Form

<html>

<head>
<title>Registration Form</title>
</head>
<body>
<h1>Registration Form</h1>
<form>
<label> FirstName:</label><br>
<input type="text"required><br><br>
<label>LastName:</label><br>
<input type="text"required><br><br>
<label>Email:</label><br>
<input type="email"required><br><br>
<label>Password:</label><br>
<input type="password" required><br><br>
<label>Gender:</label><br>
<input type="radio" name="gender"value="male">Male<br>
<input type="radio" name="gender"value="female">Female<br><br>
<label>DateofBirth:</label><br>
<input type="date"required><br><br>
<label>Country:</label><br>
<select required>
<option> India </option>
<option> USA </option>
<option> Canada </option>
<option> Australia </option>
</select><br><br>
<label>Address:</label><br>
<text area rows="4"cols="50"required></textarea><br><br>
<input type="submit" value="Register">
<input type="reset"value="Reset">
</form>
</body>
</html>
OUTPUT

x
7 Write a HTML program to develop a static Login Page.
<html>
<head>

<title>Login Page</title>

</head>

<body>
<h1>Login</h1>

<label> Username:</label><br>

<input type="text"required><br><br>

<label>Password:</label><br>

<input type="password"required><br><br>

<input type="submit"><br><br>

<p>Don't have an account? <a href="#">SignUp</a></p>

</body>

</html>

OUTPUT

8.Write a HTML code to create a webpage with pink color background and display
moving message in red color
<html>

<head>

<title>Moving Message Page</title>

</head>

<body style="background-color: pink;">

<marquee style="color:red;">This is a moving message in red color!</marquee>

</body>

</html>
OUTPUT

9 Write a HTML program to develop a static Web Page for Shopping Cart

<html>

<head>

<title>Shopping Cart</title>

</head>

<body>

<h1>Shopping Cart</h1>

<h2>Items in Your Cart</h2>

<ul>

<li>Item1-$10.00</li>

<li>Item2-$15.00</li> <li>Item3-$20.00</li>

</ul>

<h2>Total:$45.00</h2>

<button>Proceed to Checkout</button>

<button>Continue Shopping</button>

</body>

</html>

OUTPUT:
10. HTML program to create simple calculator
<!DOCTYPE html>
<html>
<head>
<title>HTML Calculator</title>
</head>
<body>
<!-- Create table -->
<table id="calcu">
<tr>
<td colspan="3">
<input type="text" id="result">
</td>
<td><input type="button" value="c"></td>
</tr>
<tr>
<td><input type="button" value="1"></td>
<td><input type="button" value="2"></td>
<td><input type="button" value="3"></td>
<td><input type="button" value="/"></td>
</tr>
<tr>
<td><input type="button" value="4"></td>
<td><input type="button" value="5"></td>
<td><input type="button" value="6"></td>
<td><input type="button" value="*"></td>
</tr>
<tr>
<td><input type="button" value="7"></td>
<td><input type="button" value="8"></td>
<td><input type="button" value="9"></td>
<td><input type="button" value="-"></td>
</tr>
<tr>
<td><input type="button" value="0"></td>
<td><input type="button" value="."></td>
<td><input type="button" value="="></td>
<td><input type="button" value="+"></td>
</tr>
</table>
</body> </html>
OUTPUT:

You might also like