Eg Programs
Eg Programs
Eg Programs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<label for="age">Age:</label><br>
<label for="gender">Gender:</label><br>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select><br><br>
</select><br><br>
</form>
</body>
</html>
Program 7
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Product Catalog</title>
</head>
<body>
<hr>
<div>
<p><strong>Description:</strong> These running shoes provide ultimate comfort and support for
long-distance running.</p>
<p><strong>Price:</strong> $49.99</p>
</div>
<hr>
<div>
<h2>Product 2: Yoga Mat</h2>
<p><strong>Description:</strong> A high-density yoga mat perfect for comfort during workouts and
yoga sessions.</p>
<p><strong>Price:</strong> $19.99</p>
</div>
<hr>
<div>
<p><strong>Price:</strong> $89.99</p>
</div>
<hr>
<div>
<p><strong>Price:</strong> $12.99</p>
</div>
<hr>
<footer>
</footer>
</body>
</html>
Program 11
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Signup Form</title>
<script>
function validateForm() {
// Validate username
if (!username.match(usernameRegex)) {
alert("Username must be at least 3 characters long and contain only letters and numbers.");
return false;
// Validate password
if (!password.match(passwordRegex)) {
alert("Password must be at least 8 characters long and include both letters and numbers.");
return false;
if (!phone.match(phoneRegex)) {
return false;
}
// Validate email
if (!email.match(emailRegex)) {
return false;
return true;
</script>
</head>
<body>
<h2>Signup Form</h2>
<label for="username">Username:</label><br>
<label for="password">Password:</label><br>
<label for="email">Email:</label><br>
<button type="submit">Signup</button>
</form>
</body>
</html>
Program 12
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script>
function isLeapYear(year) {
if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {
// Function to handle form submission and check if the year is a leap year
function checkLeapYear() {
let year = document.getElementById("year").value; // Get the year from the input field
if (isNaN(year)) {
if (isLeapYear(year)) {
} else {
</script>
</head>
<body>
<h2>Leap Year Checker</h2>
</body>
</html>
Program 13
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Temperature Converter</title>
<script>
function celsiusToFahrenheit() {
</script>
</head>
<body>
<h2>Temperature Converter</h2>
<br><br>
<br><br>
<footer>
<p>Enter the value in either Celsius or Fahrenheit, and the other temperature will be converted
automatically.</p>
</footer>
</body>
</html>
Program 14
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<style>
body {
margin: 20px;
.shopping-list {
margin-top: 20px;
input[type="text"] {
padding: 8px;
margin-right: 10px;
button {
padding: 8px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
button:hover {
background-color: #45a049;
ul {
list-style-type: none;
padding: 0;
li {
padding: 5px;
</style>
</head>
<body>
<div ng-controller="ShoppingListController">
<h1>Shopping List</h1>
<button ng-click="addItem()">Add</button>
<div class="shopping-list">
<ul>
{{item.name}}
<button ng-click="removeItem($index)">Remove</button>
</li>
</ul>
</div>
</div>
<script>
app.controller('ShoppingListController', function($scope) {
$scope.shoppingList = [];
$scope.addItem = function() {
if ($scope.newItem) {
$scope.newItem = ''; // Clear the input field after adding the item
};
$scope.removeItem = function(index) {
$scope.shoppingList.splice(index, 1);
};
});
</script>
</body>
</html>
Program 15
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-route.min.js"></script>
<style>
body {
margin: 20px;
nav {
background-color: #4CAF50;
padding: 10px;
margin-bottom: 20px;
nav a {
color: white;
margin-right: 15px;
text-decoration: none;
nav a:hover {
text-decoration: underline;
.content {
margin-top: 20px;
</style>
</head>
<body>
<div ng-controller="NavController">
<nav>
<a href="#!/">Home</a>
<a href="#!/about">About</a>
</nav>
<!-- The view that will change dynamically based on the route -->
<div class="content">
<ng-view></ng-view>
</div>
</div>
<script>
app.config(function($routeProvider) {
$routeProvider
.when('/', {
})
.when('/about', {
template: '<h2>About Us</h2><p>This is the about page content.</p>',
})
.otherwise({
redirectTo: '/'
});
});
// Create a controller for navigation (optional, if you want to manage some logic)
app.controller('NavController', function($scope) {
});
</script>
</body>
</html>
Program 16
<!DOCTYPE html>
<html>
<style>
div {
background-color: lightblue;
height: 100px;
width: 100%;
position: relative;
top: 0;
left: 0;
.ng-hide {
height: 0;
width: 0;
background-color: transparent;
top:-200px;
left: 200px;
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-animate.js"></script>
<body ng-app="myApp">
<div ng-hide="myCheck"></div>
<script>
var app = angular.module('myApp', ['ngAnimate']);
</script>
</body>
</html>
Program 17
o WAMP (Windows)
o MAMP (macOS)
2. Download WordPress:
3. Set Up XAMPP/WAMP/MAMP:
4. Create a Database:
o Move the contents to the htdocs (for XAMPP) or equivalent folder (e.g.,
/htdocs/wordpress).
6. Install WordPress:
o Buy a hosting plan and domain from providers like Bluehost, SiteGround, or HostGator.
o Look for "WordPress Installer" or "Softaculous" under the app installers section.
o Click "Install Now," fill in the details, and follow the instructions.
3. Manual Installation:
o Upload the WordPress files to the public_html folder via FTP (using FileZilla or similar
software).
Examples:
o Forms: WPForms.
o Security: Wordfence.
4. Customize Appearance:
Use drag-and-drop functionality to create visually appealing layouts for pages like the
homepage.
7. Set a Homepage:
Additional Tips:
Backup Your Site: Use plugins like UpdraftPlus for regular backups.
Secure Your Site: Ensure your site uses SSL and install a security plugin.
Program 18
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<form id="hobbyForm">
</form>
<script>
$(document).ready(function() {
$('#getValues').click(function() {
$('input[name="hobby"]:checked').each(function() {
selectedHobbies.push($(this).val());
});
if (selectedHobbies.length > 0) {
} else {
});
});
</script>
</body>
</html>
Program 19
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
.box {
width: 100px;
height: 100px;
background-color: #4CAF50;
position: absolute;
top: 50px;
left: 50px;
</style>
</head>
<body>
<div class="box"></div>
<script>
$(document).ready(function () {
$("#startAnimation").click(function () {
});
$("#stopAnimation").click(function () {
box.stop();
});
// Stop animation and jump to the end of the current animation
$("#stopAndJump").click(function () {
box.stop(true, true);
});
});
</script>
</body>
</html>