Notes
Notes
Dehradun
LAB FILE
No. of credits : 3
Semester :4
Batch :1
Roll No :R2142220169
________________________
Faculty Signature
INDEX
Experiment 1: Basic HTML Tags
Q1. Design a webpage to describe your university. The webpage should have properly
aligned paragraphs to show textual information and images wherever required.
Q3. Create a webpage that should have a menu to show different tourist places in
Dehradun. Use different fore ground, background colors, images and other properties.
3. Create HTML form for selecting sports in your university. The form should have fields
like Name, Password, Address, Select Game, Gender, Age etc.
Experiment 3: Use of Inline, Internal and External stylesheets and incorporating styles
in HTML document.
1. Add a CSS media query and appropriate styles so that the webpage looks similar even
when resized to smaller widths. Specifically:
2. The sidebar should be hidden.
3. The body should have no padding.
4. The images shouldn't exceed the width of the window.
5. The navigation items should each be on their own line.
6. The header should be fixed, so that it stays at the top after scrolling.
1. Write a JavaScript program that displays the largest integer among two integers.
2. Write a JavaScript function that accepts a string as a parameter and converts the first
letter of each word into upper case.
3. Write a Java Script to create a simple calculator.
4. Write a JavaScript function that accepts a string as a parameter and finds the longest
word within the string.
5. Write a JavaScript program to find odd and even numbers from 1 to 100.
6. Write a JavaScript program to generate a random string.
7. Write a JavaScript Program to Print All Prime Numbers in an Interval.
8. Write a JavaScript program to populate a drop-down box from 1 to 1000.
1. Write a Java script program to Generate a Random Number and display it in a textbox.
2. Write a JavaScript function that changes the background color of an element on a
particular event.
3. Write a Java script to validate course registration form.
4. Write a JavaScript program that adds a keydown event listener to a text input to detect
when the "Enter key" is pressed.
5. Write a program to show the use of alert, prompt and confirm dialog boxes.
6. Write a JavaScript function to extract a specified number of characters from a string.
7. Write a function to accept date of birth from a user and calculate the difference till
current date
Experiment 1
Q1. Design a webpage to describe your university. The webpage should have properly
aligned paragraphs to show textual information and images wherever required.
[email protected]</p
</html>
</menu>
</body>
</html>
2:
1. Add a CSS media query and appropriate styles so that the webpage looks similar
even when resized to smaller widths. Specifically:
2. The sidebar should be hidden.
3. The body should have no padding.
4. The images shouldn't exceed the width of the window.
5. The navigation items should each be on their own line.
6. The header should be fixed, so that it stays at the top after scrolling.
Experiment 5
1. Write a JavaScript program that displays the largest integer among two integers.
2. Write a JavaScript function that
accepts a string as a parameter and
converts the first letter of each word into upper case.
3. Write a Java Script to create a simple calculator.
4. Write a JavaScript function that accepts a string as a parameter and finds the longest
word within the string.
5. Write
a
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script>
function findOddEvenNumbers() {
if (i % 2 === 0) {
evenNumbers.push(i);
} else {
oddNumbers.push(i);
</script>
</head>
<body>
<div id="odd"></div>
<div id="even"></div>
</body>
</html>
6. Write a JavaScript program to generate a random string.
7. Write a JavaScript Program to Print All Prime Numbers in an Interval.
8. Write a JavaScript program to populate a drop-down box from 1 to 1000.
}
</script>
</body>
</html>
Experiment 6
1. Write a Java script program to Generate a Random Number and display it in a textbox.
Write a JavaScript function that changes the background color of an
element on a particular event.
Write a Java script to validate course registration form.
Write a JavaScript program that adds a keydown event listener to a text input to detect
when the "Enter key" is pressed.
Write a program to
show the use of alert,
prompt and confirm
dialog boxes.
Write a JavaScript function to extract a specified number of characters from a string.
Write a function to accept date of birth from a user and calculate the difference till current
date.