Web Technology Lab
Web Technology Lab
(A CENTRAL UNIVERSITY)
R. Venkataraman Nagar, Kalapet,
Puducherry – 605014.
COMPUTER SCIENCE
CSIG 363 - Practical VI – Web Technology Lab
NAME : SURENDIRAN B
REGISTER NO. : 20384121
DEPARTMENT : COMPUTER SCIENCE
SEMESTER : VI
PONDICHERRY UNIVERSITY
(A CENTRAL UNIVERSITY)
R. Venkataraman Nagar, Kalapet,
Puducherry – 605014.
BONAFIDE CERTIFICATE
Faculty-In-Charge
9
Source Code: (HTML)
<!DOCTYPE html>
<html>
<head>
<title>Favorite Things</title>
</head>
<body>
<h1>My Favorite Things</h1>
<h2>Favorite Books:</h2>
<ul>
<li>The Catcher in the Rye</li>
<li>To Kill a Mockingbird</li>
<li>The Great Gatsby</li>
</ul>
<h2>Favorite Movies:</h2>
<ol>
<li>The Shawshank Redemption</li>
<li>The Godfather</li>
<li>The Dark Knight</li>
</ol>
<h2>Favorite Foods:</h2>
<ul>
<li>Pizza</li>
<li>Sushi</li>
<li>Tacos</li>
</ul>
</body>
</html>
OUTPUT:
Source Code:(HTML)
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>Registration Form</h1>
<p>Please fill out this form with the required information</p>
<form>
<fieldset>
<label>Enter Your First Name: <input type="text" name="first-
name" required /></label>
<label>Enter Your Last Name: <input type="text" name="last-
name" required /></label>
<label>Enter Your Email: <input type="email" name="email"
required /></label>
<label>Create a New Password: <input type="password"
name="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
<fieldset>
<label><input type="radio" name="account-type" class="inline"
/> Personal Account</label>
<label><input type="radio" name="account-type" class="inline"
/> Business Account</label>
<label>
<input type="checkbox" name="terms" class="inline" required
/> I accept the <a>terms and conditions</a>
</label>
</fieldset>
<fieldset>
<label>Upload a profile picture: <input type="file"
name="file" /></label>
<label>Input your age (years): <input type="number" name="age"
min="13" max="120" />
</label>
<label>How did you hear about us?
<select name="referrer">
<option value="">(select one)</option>
<option value="1">freeCodeCamp News</option>
<option value="2">freeCodeCamp YouTube Channel</option>
<option value="3">freeCodeCamp Forum</option>
<option value="4">Other</option>
</select>
</label>
<label>Provide a bio:
<textarea name="bio" rows="3" cols="30" placeholder="I like
coding on the beach..."></textarea>
</label>
</fieldset>
<input type="submit" value="Submit" />
</form>
</body>
</html>
(CSS)
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #f5f6f7;
font-family: Tahoma;
font-size: 16px;
}
h1, p {
margin: 1em auto;
text-align: center;
}
form {
width: 60vw;
max-width: 500px;
min-width: 300px;
margin: 0 auto;
padding-bottom: 2em;
}
fieldset {
border: none;
padding: 2rem 0;
}
fieldset:not(:last-of-type) {
border-bottom: 3px solid #3b3b4f;
}
label {
display: block;
margin: 0.5rem 0;
}
input,
textarea,
select {
margin: 10px 0 0 0;
width: 100%;
min-height: 2em;
}
input, textarea {
background-color: #0a0a23;
border: 1px solid #0a0a23;
color: #ffffff;
}
.inline {
width: unset;
margin: 0 0.5em 0 0;
vertical-align: middle;
}
input[type="submit"] {
display: block;
width: 60%;
margin: 1em auto;
height: 2em;
font-size: 1.1rem;
background-color: #3b3b4f;
border-color: white;
min-width: 300px;
}
input[type="file"] {
padding: 1px 2px;
}
a {
color: #dfdfe2;
}
Output:
Source Code:
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
width: 50%;
margin: auto;
}
th, td {
text-align: center;
padding: 8px;
}
th {
background-color: #009879;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<table>
<tr>
<th>Time</th>
<th>Activity</th>
</tr>
<tr>
<td>8:00-9:00</td>
<td>Yoga</td>
</tr>
<tr>
<td>9:00-10:00</td>
<td>Breakfast</td>
</tr>
<tr>
<td>10:00-11:00</td>
<td>Workout</td>
</tr>
<tr>
<td>11:00-12:00</td>
<td>Shower</td>
</tr>
<tr>
<td>12:00-1:00</td>
<td>Lunch</td
</tr>
<tr>
<td>1:00-2:00</td>
<td>Study</td>
</tr>
</table>
</body>
</html>
Output:
Source Code:
(HTML)
<!DOCTYPE html>
<html>
<head>
<title>Job Entry Form</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Job Entry Form</h1>
<form action="#" method="post">
<label for="fullname">Full Name</label>
<input type="text" id="fullname" name="fullname" required>
<label for="email">Email Address</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" required>
<label for="resume">Upload Resume</label>
<input type="file" id="resume" name="resume"
accept=".pdf,.doc,.docx" required>
<label for="position">Position Applying For</label>
<select id="position" name="position" required>
<option value="" disabled selected>Select position</option>
<option value="developer">Developer</option>
<option value="designer">Designer</option>
<option value="manager">Manager</option>
</select>
<label for="salary">Salary Requirements</label>
<input type="number" id="salary" name="salary" required>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Table</title>
<style>
table {
border-collapse: collapse;
width: 100%;
margin-bottom: 20px;
}
th, td {
text-align: left;
padding: 8px;
border: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Item</th>
<th>Description</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Burgur</td>
<td>Hamburgur</td>
<td>Rs.10.00</td>
</tr>
<tr>
<td>Grilled Cheese</td>
<td>Melted cheddar cheese between two slices of toasted
bread</td>
<td>Rs.20.00</td>
</tr>
<tr>
<td>Classic Burger</td>
<td>Beef patty, lettuce, tomato, onion, and special
sauce on a bun</td>
<td>Rs.15.00</td>
</tr>
<tr>
<td>Chocolate Cake</td>
<td>Moist chocolate cake with chocolate frosting and
whipped cream</td>
<td>Rs.12.50</td>
</tr>
<tr>
<td>Fish and Chips</td>
<td>Beer-battered cod with fries and tartar sauce</td>
<td>Rs.18.75</td>
</tr>
<tr>
<td>Caesar Salad</td>
<td>Romaine lettuce, croutons, parmesan cheese, and
caesar dressing</td>
<td>Rs.25.00</td>
</tr>
</tbody>
</table>
</body>
</html>
OUTPUT:
Source Code:
(html)
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="alert">
<h2>Hey! Read Me...</h2>
<p>This is an example of what you can do with pure css to style
radio buttons or checkboxes. If you are looking a more flexible &
mordern way to style radio buttons on forms</p>
</div>
<div class="container">
<h2>Your favorite thing in the world:</h2>
<ul>
<li>
<input type="radio" id="f-option" name="selector">
<label for="f-option">Pizza</label>
<div class="check"></div>
</li>
<li>
<input type="radio" id="s-option" name="selector">
<label for="s-option">Bacon</label>
<div class="check"><div class="inside"></div></div>
</li>
<li>
<input type="radio" id="t-option" name="selector">
<label for="t-option">Cats</label>
<div class="check"><div class="inside"></div></div>
</li>
</ul>
</div>
<div class="signature">
<p>Made with <i class="much-heart"></i> by <a
href="https://codepen.io/AngelaVelasquez">Surendiran</a></p>
</div>
</body>
</html>
External CSS
@import url('https://fonts.googleapis.com/css?family=Lato');
body, html{
height: 100%;
background: #222222;
font-family: 'Lato', sans-serif;
}
.container{
display: block;
position: relative;
margin: 40px auto;
height: auto;
width: 500px;
padding: 20px;
}
h2 {
color: #AAAAAA;
}
.container ul{
list-style: none;
margin: 0;
padding: 0;
overflow: auto;
}
ul li{
color: #AAAAAA;
display: block;
position: relative;
float: left;
width: 100%;
height: 100px;
border-bottom: 1px solid #333;
}
ul li input[type=radio]{
position: absolute;
visibility: hidden;
}
ul li label{
display: block;
position: relative;
font-weight: 300;
font-size: 1.35em;
padding: 25px 25px 25px 80px;
margin: 10px auto;
height: 30px;
z-index: 9;
cursor: pointer;
-webkit-transition: all 0.25s linear;
}
ul li:hover label{
color: #FFFFFF;
}
ul li .check{
display: block;
position: absolute;
border: 5px solid #AAAAAA;
border-radius: 100%;
height: 25px;
width: 25px;
top: 30px;
left: 20px;
z-index: 5;
transition: border .25s linear;
-webkit-transition: border .25s linear;
}
ul li:hover .check {
border: 5px solid #FFFFFF;
}
ul li .check::before {
display: block;
position: absolute;
content: '';
border-radius: 100%;
height: 15px;
width: 15px;
top: 5px;
left: 5px;
margin: auto;
transition: background 0.25s linear;
-webkit-transition: background 0.25s linear;
}
input[type=radio]:checked ~ .check {
border: 5px solid #0DFF92;
}
input[type=radio]:checked ~ .check::before{
background: #0DFF92;
}
input[type=radio]:checked ~ label{
color: #0DFF92;
}
.signature {
margin: 10px auto;
padding: 10px 0;
width: 100%;
}
.signature p{
text-align: center;
font-family: Helvetica, Arial, Sans-Serif;
font-size: 0.85em;
color: #AAAAAA;
}
.signature .much-heart{
display: inline-block;
position: relative;
margin: 0 4px;
height: 10px;
width: 10px;
background: #AC1D3F;
border-radius: 4px;
-ms-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.signature .much-heart::before,
.signature .much-heart::after {
display: block;
content: '';
position: absolute;
margin: auto;
height: 10px;
width: 10px;
border-radius: 5px;
background: #AC1D1D;
top: -4px;
}
.signature .much-heart::after {
bottom: 0;
top: auto;
left: -4px;
}
.signature a {
color: #AAAAAA;
text-decoration: none;
font-weight: bold;
}
.alert {
box-sizing: border-box;
background-color: #BDFFE1;
width: 100%;
position: relative;
top: 0;
left: 0;
z-index: 300;
padding: 20px 40px;
color: #333;
}
.alert h2 {
font-size: 22px;
color: #232323;
margin-top: 0;
}
.alert p {
line-height: 1.6em;
font-size:18px;
}
.alert a {
color: #232323;
font-weight: bold;
}
OUTPUT:
Source Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Digital clock</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="time">
<div class="circle" style="--clr:#ff2972;">
<div class="dots hr_dot"></div>
<svg>
<circle cx="70" cy="70" r="70"></circle>
<circle cx="70" cy="70" r="70" id="hh"></circle>
</svg>
<div id="hours">00</div>
</div>
<div class="circle" style="--clr:#fee800;">
<div class="dots min_dot"></div>
<svg>
<circle cx="70" cy="70" r="70"></circle>
<circle cx="70" cy="70" r="70" id="mm"></circle>
</svg>
<div id="minutes">00</div>
</div>
<div class="circle" style="--clr:#04fc43;">
<div class="dots sec_dot"></div>
<svg>
<circle cx="70" cy="70" r="70"></circle>
<circle cx="70" cy="70" r="70" id="ss"></circle>
</svg>
<div id="seconds">00</div>
</div>
<div class="ap">
<div id="ampm">AM</div>
</div>
</div>
<script>
let hh = document.getElementById('hh')
let mm = document.getElementById('mm')
let ss = document.getElementById('ss')
hours.innerHTML = h + "<br><span>Hours</span>";
minutes.innerHTML = m + "<br><span>Minutes</span>";
seconds.innerHTML = s + "<br><span>Seconds</span>";
ampm.innerHTML = a;
hr_dot.style.transform = `rotate(${h*30}deg)`
min_dot.style.transform = `rotate(${m*6}deg)`
sec_dot.style.transform = `rotate(${s*6}deg)`
})
</script>
</body>
</html>
(CSS):
@import url('https://fonts.googleapis.com/css?family=Poppins:
200,300,400,500,600,700,800,900&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #2f363e;
}
#time{
display: flex;
gap: 40px;
color: #fff;
}
#time .circle{
position: relative;
width: 150px;
height: 150px;
display: flex;
justify-content: center;
align-items: center;
}
#time div {
position: absolute;
text-align: center;
font-weight: 500;
font-size: 1.5em;
}
#time .ap{
position: relative;
font-size: 1em;
transform: translate(-20px);
}
.dots{
position: absolute;
width: 100%;
height: 100%;
z-index: 10;
display: flex;
justify-content: center;
}
.dots::before {
content: '';
position: absolute;
top: -3px;
width: 15px;
height: 15px;
background: var(--clr);
border-radius: 50%;
box-shadow: 0 0 20px var(--clr), 0 0 60px var(--clr);
}
OUTPUT:
Source Code:
(HTML)
<!DOCTYPE html>
<html>
<head>
<title>Palindrome Checker</title>
</head>
<body>
<h1>Palindrome Checker</h1>
<label for="input">Enter a word:</label>
<input type="text" id="input" />
<button onclick="checkPalindrome()">Check</button>
<p id="result"></p>
<script src="palindrom or not.js"></script>
</body>
</html>
(Java Script)
<script>
function add() {
var num1 = parseFloat(document.getElementById("num1").value);
var num2 = parseFloat(document.getElementById("num2").value);
var result = num1 + num2;
document.getElementById("result").innerHTML = "Result: " + result;
}
function subtract() {
var num1 = parseFloat(document.getElementById("num1").value);
var num2 = parseFloat(document.getElementById("num2").value);
var result = num1 - num2;
document.getElementById("result").innerHTML = "Result: " + result;
}
function multiply() {
var num1 = parseFloat(document.getElementById("num1").value);
var num2 = parseFloat(document.getElementById("num2").value);
var result = num1 * num2;
document.getElementById("result").innerHTML = "Result: " + result;
}
function divide() {
var num1 = parseFloat(document.getElementById("num1").value);
var num2 = parseFloat(document.getElementById("num2").value);
var result = num1 / num2;
document.getElementById("result").innerHTML = "Result: " + result;
}
</script>
</body>
</html>
OUTPUT: