webtech.file
webtech.file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 20px;
.container {
max-width: 800px;
margin: 0 auto;
margin-top: 0;
.sec on {
.sec on h2 {
.subsec on {
margin-le : 20px;
}
.subsec on h3 {
margin-top: 10px;
.subsec on ul {
margin-top: 5px;
</style>
</head>
<body>
<div class="container">
<header>
<h1>Arun Singh</h1>
</header>
<p>Email: [email protected]</p>
<p>Phone: 8083234530</p>
</sec on>
<h2>Educa on</h2>
</div>
</sec on>
<ul>
</ul>
</div>
</sec on>
<h2>Skills</h2>
<ul>
</ul>
</sec on>
<h2>Languages</h2>
<ul>
<li>English (Fluent)</li>
<li>Spanish (Basic)</li>
</ul>
</sec on>
</div>
</body>
</html>
Output:
Arun Singh
Software Developer
Contact Information
Email: [email protected]
Phone: 8083234530
Education
Bachelor of Science in Information Technology
Experience
Software Developer
Skills
Programming Languages: Java, Python, JavaScript
Frameworks: Spring, Django, React
Databases: MySQL, MongoDB
Languages
English (Fluent)
French (Intermediate)
2.Design a HTML form to reserve a railway cket.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
form {
max-width: 400px;
margin: 0 auto;
width: 100%;
padding: 10px;
margin: 5px 0;
box-sizing: border-box;
input[type="submit"] {
width: 100%;
background-color: #4CAF50;
color: white;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
</style>
</head>
<body>
<label for="name">Name:</label>
<label for="email">Email:</label>
<label for="phone">Phone:</label>
<label for="from">From:</label>
<label for="to">To:</label>
<label for="date">Date:</label>
<label for="class">Class:</label>
</select>
</form>
</body>
</html>
3.Write a Java Script program that finds the greatest
common divisor of two numbers.
func on gcd(a, b) {
if (a < b) {
while (b !== 0) {
let temp = b;
b = a % b;
a = temp;
return a;
console.log(`The greatest common divisor of ${num1} and ${num2} is: ${gcd(num1, num2)}`);
Output:
The greatest common divisor of 48 and 18 is: 6
4.In the form of railway reservation of ticket add the
following validations using java script.
a. From city and to city are two different cities.
b. Age of passengers should not be greater than
150.
c. Name of passengers should be a string of
maximum length.
<!DOCTYPE html>
<html>
<head>
<title>Railway Ticket Reservation</title>
<script>
function validateForm() {
var fromCity = document.getElementById("fromCity").value;
var toCity = document.getElementById("toCity").value;
var age = parseInt(document.getElementById("age").value);
var name = document.getElementById("name").value;
// Validate age
if (age > 150) {
alert("Age should not be greater than 150");
return false;
}
return true;
}
</script>
</head>
<body>
<h2>Railway Ticket Reservation</h2>
<form onsubmit="return validateForm()">
<label for="fromCity">From City:</label>
<input type="text" id="fromCity" name="fromCity"><br><br>
<label for="age">Age:</label>
<input type="number" id="age" name="age"><br><br>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<!DOCTYPE html>
<html>
<head>
< tle>ASP Client/Server Scrip ng Example</ tle>
</head>
<body>
<form ac on="example.asp" method="post">
Enter your name: <input type="text" name="name"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
6. Write a piece of code in XML for creating DTD,
which specifies set of rules.
<!DOCTYPE bookstore [