Professional Documents
Culture Documents
Web Designing Record-2022-23
Web Designing Record-2022-23
AIM: To design a page having suitable background colour and text colour with title “My First
Web Page” using all the attributes of the Font tag.
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 4: Set the background for the webpage by using bgcolor attributes of the body tag
1
MY FIRST WEB PAGE
CODING:
<html >
<head>
</head>
<body bgcolor="green">
</body>
</html>
2
Output:
3
Ex No : 2
AIM: To create a HTML page, which has properly aligned paragraphs with image along with it
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 3: The HTML <img> tag is used to embed an image in a web page.
Step 4: The <img> tag has two required attributes where “src” specifies the
path to the image and “alt” specifies an alternate text for the image
Step 5: Specify the width and height attributes for “img” element
4
HTML PAGE WITH TEXT AND IMAGE
CODING:
<html>
<head>
<title>VCW</title>
</head>
<body bgcolor=yellow>
<center>
<h1><font color =blue>VELLALAR COLLEGE FOR WOMEN</h1>
<h3><font color =green>"COLLEGE WITH POTENTIAL FOR EXCELLENCE"</font>
<font color=red>(Autonomous)</font></h3>
<img src="z1.jpg" height=250 width=250></img>
</center>
</body>
</html>
5
Output:
6
Ex No : 3
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 4: Use <ol> and <ul> tag to display ordered and unordered list of all items
Inside <ol> and <ul> tag use <li>---</li> tag to list each item
7
NESTED LIST
CODING:
<html>
<head><h1><center> CAKE SHOP</center></h1><head>
<body bgcolor="salmon"/>
<title>welcome to all</title>
<p><h2><center>Available Items</center></h2></p>
<ul>
<li>Dessert without cheese </li>
<br/>
<ol>
<li><strong>CAKES</strong>
<br/>
<ul>
<li>Vanilla cake</li>
<li>Chocolate cake</li>
<ol>
<li>chocolate buttermilk layer cake</li>
<li>chocolate filled cupcake</li>
</ol>
<li>White forest cake</li>
</ul>
<br/>
<li><strong>SWEETS</strong></li>
<br/>
8
<ol>
<li>Gulab jamun</li>
<li>Laddu</li>
<ul>
<li>sesame laddu</li>
<li>atta laddu</li>
<li>besan laddu</li>
</ul>
<li>Kheer</li>
</ol>
</li>
</body>
</html>
9
Output:
10
Ex No : 4
AIM: To write a program Set a background image for both the page and single elements on the
page.
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 3: Specify the background image on the <body> element which displays the entire
11
BACKGROUND IMAGE
CODING:
<html>
<head>
<title>Setting background image</title>
<style type="text/css">
body
{
background-image:url("z1.jpeg");
}
</style>
</head>
<body text="#ee78a2">
<h1>Life is beautiful!!!</h1>
</body>
</html>
12
Output:
13
Ex No : 5
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 4: Wrap a <form> element around them to process the input to get username and
Password
Step 5: Create input fields and a submit button. The input fields can be of type “text” or
“password.
Step 6: Create buttons to submit and reset the form
14
LOGIN PAGE
CODING:
<html>
<head>
<title>Login page</title>
</head>
<body>
<center>
<font face="Arial Black" size="4"><u><b>LOGIN FORM</b></u></font>
<br><br>
<form name="f1" action="" method="post">
<table frame="box" cellspacing="10">
<tr>
<td>Login</td>
<td><input type="text" size="25"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" size="25"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="SUBMIT">
<input type="reset" value="RESET"></td>
</tr></table>
</form>
</center>
</body></html>
15
Output:
16
Ex No : 6
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 5: Label tag is used to display the content just before text field
Step 6: Radio Buttons are used to choose gender and Checkbox is used to select language
Step 7: Create buttons to submit and save the file with html extension
17
REGISTRATION FORM
CODING:
<html>
<head>
<title>Registration Form</title>
</head>
<body>
<p align="left">
<h2 align="center">Registration Form</h2>
<form>
<label><b>Name</b></label>
<input type="text" placeholder="Enter your name" name="sname"><br/<br/>
<label><b>Password</b></label>
<input type="password" placeholder="Enter password"><br/><br/>
<label><b>Email id</b></label>
<input type="text" placeholder="Enter mailid"><br/><br/>
<label><b>Contact Number</b></label>
<input type="number" placeholder="Enter Contact Number"><br/><br/>
<label><b>Gender</b></label>
<input type="radio" name="gender" value="Male">
<label>Male</label>
<input type="radio" name="gender" value="Female">
<label>Female</label><br><br>
<label><b>Languages Known</b></label>
<input type="checkbox" id="L1" value="English">
<label for="L1"> English</label>
<input type="checkbox" id="L2" value="Tamil">
18
<label for="L2"> Tamil</label><br><br>
<label><b>Address</b></label>
<textarea name="Address" rows="6" column="50">Enter address here....</textarea><br/<br/>
<label for="DOB"><b>DOB:<b></label>
<input type="date" id="birthday" name="birthday">
<br/><br/>
<input type="submit" value="submit">
</form>
</body>
</html>
19
Output:
20
Ex No : 7
AIM: To use HTML and CSS to create a 3-column layout with a top banner section, first column
contains Buttons, second column shows the main content and third column contains
advertisements
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 3: Three columns are defined using <div> element which divide the entire browser
Step 4: Three columns are created with buttons, main content and advertisements.
Step 5: Top banner section and copyright statement in the bottom of the page is designed
21
HTML AND CSS- THREE COLUMN LAYOUT
CODING:
<html>
<head>
<style type="text/css">
p{font-size:20px;
font-family:sans-serif;
text-alignment:left}
h1 {text-decoration:underline; color:blue}
h2 {color:darkslateblue}
</style>
</head>
<body>
<div style="width:100%">
<div style="width:100%; background-color:violet">
<h1><center>CAKE SHOP</center></h1>
</div>
<div style= "width:200px; height:600px;
background-color:cyan;
float:left" >
<center><table border="3">
<caption><strong>DISH</strong></caption>
</br>
<tr><th>sweets</th></tr>
<tr><th>cake </th></tr>
<tr><th>candies</th></tr>
22
</table></center>
</div>
<div style= "width:420px;
height:600px;
background-color:pink;
float:left">
<h2>SUGAR CAKE SPECIAL</h2>
<p>Cake is a form of sweet dessert that is typically baked. </p>
</div>
<div style= "width:300px;
height:600px;
background-color:dodgerblue;
float:left" >
<p><h4>contact no:9735678890</h4></p>
<h3>Address:</h3>
<p>Navya Bake Shop,Kerala</p>
<p>www.navyabakers.com</p>
</div>
<div style= "width:100%">
<div style=" background-color:green;
clear:both">
<center><p>copyright all information of this site </p></center>
</div>
</div>
</div>
</body>
</html>
23
Output:
24
Ex No : 8
AIM: To write a simple drawing program using onmousemove that allows the user to draw
inside a box in red or blue by holding down the Shift or Ctrl keys.
ALGORITHM:
Step 2: Create HTML document using <html>, <head> and <body> elements
Step 4: Apply Canvas methods for drawing paths and specify an id attribute , width
and height attribute to define the size of the canvas.
Step 5: The mousemove() method triggers the mousemove event, or attaches a function to
Step 6: Use if condition to draw inside a box in red or blue by holding down the Shift
or Ctrl keys with mousemove.
25
SIMPLE DRAWING USING ONMOUSEMOVE
CODING:
<html>
<head>
<title>simple drawing program</title>
<style type=''text/css">
#canvas { width: 400px;
border: 1px solid #999999;
border-collapse:collapse }
td { width: 4px;
height: 4px }
th.key { font-family:arial,helvetica,sans-serif;
font-size:12px;
border-bottom: 1px solid #999999 }
</style>
<script type="text/javascript">
function createCanvas()
{
var side=100;
var tbody=document.getElementById("tablebody");
for ( var i=0; i<side;i++)
{
var row=document.createElement("tr");
for ( var j=0; j<side; j++)
{
var cell = document.createElement("td");
cell.onmousemove = processMouseMove;
26
row.appendChild(cell);
}
tbody.appendChild(row);
}
}
function processMouseMove( e )
{
if (!e)
var e=window.event;
if (e.ctrlKey)
this.style.backgroundColor="blue";
if (e.shiftKey)
this.style.backgroundColor=" red";
}
</script>
</head>
<body onload= "createCanvas()">
<table id = "canvas" class = "canvas"><tbody id = "tablebody">
<tr><th class = "key" colspan = "100"> Hold<tt>ctrl</tt>
to draw blue. Hold <tt>shift</tt> to draw red.</th></tr>
</tbody></table>
</body>
</html>
27
Output:
28