WebDesign HTML CSS JS Practical Programs
WebDesign HTML CSS JS Practical Programs
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="">
Gender:
</form>
</body>
</html>
...............................................................................
create a simple HTML page with the title heading paragraph emphasize strong and image elements.
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome to My Page!</h1>
</body>
</html>
....................................................................
Write a CSS style specification rule that would make all unordered lists(<ul> tags) have square bullets
and a purple background
In CSS file
ul {
list-style-type: square;
background-color: purple;
</ul>
...........................................................................
Write a javascript program to calculate multiplication and division of two numbers (input form user).
<script type="text/javascript">
firstNumber = parseInt(firstNumber);
secondNumber = parseInt(secondNumber);
</script>
<---------------------------------------->
<!DOCTYPE html>
<html>
<body>
<br><br>
<button onclick="calculateMulDiv()">Calculate</button>
<p id="result"></p>
<script>
function calculateMulDiv() {
</script>
</body>
</html>
.............................................................................
Write a JavaScript program to find the largest of three given integers with HTML code
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
function largestInteger(x, y, z) {
return x;
return y;
} else {
return z;
document.write(largestInteger(8, 7, 9));
</script>
</body>
</html>
.........................................................................
Write a JavaScript conditional statement to sort three numbers. display an alert box to show the result
with HTML page code
<html>
<head>
<script>
let num2 = 8;
let num3 = 6;
} else {
</script>
</head>
<body>
</body>
</html>
................................................................................
Create a web page of customer profile for data entry of customer's in a Hotal, The profile should include
Name,Address, Age, gender, Room Type (A/C, Non-A/C or Deluxe), Type of payment (cash, credit/debit
card or Coupons).
<html>
<head>
<title>Customer Profile</title>
</head>
<body>
<h1>Customer Profile</h1>
<form>
<label>Name:</label><input type="text"
name="name"/><br/><br/>
<label>Address:</label><input type="text"
name="address"/><br/><br/>
<label>Age:</label><input type="number"
name="age"/><br/><br/>
<label>Gender:</label>
<select name="gender">
<option value="male">Male</option>
<option value="female">Female</option>
</select><br/><br/>
<label>Room Type:</label>
<select name="roomtype">
<option value="ac">AC</option>
<option value="non-ac">Non-AC</option>
<option value="deluxe">Deluxe</option>
</select><br/><br/>
<label>Type of Payment:</label>
<select name="payment">
<option value="cash">Cash</option>
<option value="coupon">Coupons</option>
</select><br/><br/>
</form>
</body>
</html>
.............................................................................
write a javascript function that checks whether a passed string is palindrome or not
function isPalindrome(str) {
var re = /[^A-Za-z0-9]/g;
return false;
return true;
<-------------------------------------------------------->
<!DOCTYPE html>
<html>
<head>
<title>Palindrome Checker</title>
</head>
<body>
<h2>Palindrome Checker</h2>
<div>
</div>
<h4>Result:</h4>
<div id="result"></div>
<script>
document.getElementById("checkButton").addEventListener("click", checkPalindrome);
function checkPalindrome(){
while(i<j){
if(str[i] != str[j]){
isPalindrome = false;
break;
i++;
j--;
if(isPalindrome){
}else{
</script>
</body>
</html>
.............................................................................................
<html>
<head>
<title>Factorial Program</title>
</head>
<body>
<script type="text/javascript">
function factorial(num) {
if (num < 0)
return -1;
else if (num == 0)
return 1;
else {
</script>
</body>
</html>
............................................................................
<html>
<head>
</head>
<body>
<h1>Text Formatting Tags</h1>
<p><em>Italic</em> text is used to add emphasis to a point. To make text <em>italic</em> you can
use the <strong><em></strong> tag.</p>
<p>You can also <u>underline</u> text. To underline text you can use the <strong><u></strong>
tag.</p>
<p>Finally, you can also <strike>strike through</strike> text. To strike through text you can use the
<strong><strike></strong> tag.</p>
</body>
</html>
.....................................................................
c. place Maa jinwani college name at the top of the page in large text followed by address in smaller size
d. Add names of courses offered each in a different color, style and typeface.
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("college.jpg");
background-repeat: no-repeat;
background-size: cover;
}
h1 {
font-size: 50px;
text-align: center;
p{
font-size: 25px;
text-align: center;
ul{
list-style-type: none;
text-align: center;
ul li{
display: inline;
padding: 10px;
ul li a{
font-size: 30px;
text-decoration: none;
color: black;
.scrolling-text {
margin: 0 auto;
width: auto;
height: auto;
background-color: #F7A9A9;
text-align: center;
font-size: 30px;
padding: 8px;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
@keyframes scroll {
0% {
100% {
</style>
</head>
<body>
<p>Address of college</p>
<ul>
<li><a href="">English</a></li>
<li><a href="">Science</a></li>
<li><a href="">Commerce</a></li>
<li><a href="">Maths</a></li>
</ul>
<div class="scrolling-text">Welcome to Maa Jinwani College. We aim to provide quality education to our
students.</div>
</body>
</html>
.....................................................................
<table>
<tr>
<th>Pramod Rathore</th>
</tr>
<tr>
<td>
<table>
<tr>
<th>Curriculum Vitae</th>
</tr>
<tr>
<td>
<table>
<tr>
<th>Personal Information</th>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td>Phone: 1234567890</td>
</tr>
<tr>
<td>Email: [email protected]</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th>Education</th>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th>Work Experience</th>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th>Skills</th>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
..........................................................................
<!DOCTYPE html>
<html>
<head>
<title>Style Inversion</title>
<style>
h1 {
font-size: 40px;
font-weight: bold;
h2 {
font-size: 35px;
font-weight: bold;
h3 {
font-size: 30px;
font-weight: bold;
h4 {
font-size: 26px;
font-weight: bold;
h5 {
font-size: 22px;
font-weight: bold;
}
h6 {
font-size: 18px;
font-weight: bold;
</style>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Style Inversion</title>
<style>
h1 {
font-size: 18px;
font-weight: bold;
h2 {
font-size: 22px;
font-weight: bold;
}
h3 {
font-size: 26px;
font-weight: bold;
h4 {
font-size: 30px;
font-weight: bold;
h5 {
font-size: 35px;
font-weight: bold;
h6 {
font-size: 40px;
font-weight: bold;
</style>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
..........................................................................
create a sample code of illustrate the Inline style sheet for you web page.
<html>
<head>
<style type="text/css">
body {
background-color: #FFF;
font-family: sans-serif;
.main-div {
width: 600px;
margin: auto;
background-color: #F2F2F2;
padding: 10px;
h1 {
font-size: 20px;
color: #000000;
text-align: center;
padding: 5px;
p{
font-size: 14px;
color: #000000;
line-height: 20px;
padding: 10px;
</style>
</head>
<body>
<div class="main-div">
<h1>This is a heading</h1>
<p>This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</body>
</html>
...........................................................................
Create a sample code to illustrate the external style sheet for your web page.
<html>
<head>
</head>
<body>
</body>
</html>
/* style.css */
h1 {
font-size: 24px;
font-weight: bold;
color: #000000;
p{
font-size: 18px;
font-weight: normal;
color: #666666;
......................................................................
The End