WP Prog
WP Prog
AIM- CREATE A WEB PAGE THAT COVERS YOUR CV USING VARIOUS HTML TAGS(UL,OL,TABLE etc.)
CODE-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rishabh Jain - CV</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #d2b48c;
color: #3e2723;
margin: 0;
padding: 20px;
}
.container {
max-width: 800px;
margin: auto;
padding: 20px;
background-color: #f5f5f5;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
h1 {
font-family: "Bernard MT Condensed", sans-serif;
color: #3e2723;
text-align: center;
font-size: 2em;
margin: 0;
}
h2 {
color: #5d4037;
font-family: "Book Antiqua", serif;
font-size: 1.2em;
margin-bottom: 5px;
}
ul, ol {
margin: 10px 0;
padding-left: 20px;
}
.section-title {
color: #5d4037;
border-bottom: 2px solid #8d6e63;
padding-bottom: 5px;
margin-bottom: 10px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
th, td {
text-align: left;
padding: 8px;
border-bottom: 1px solid #ddd;
}
</style>
</head>
<body>
<div class="container">
<h1>Rishabh Jain</h1>
<p style="text-align:center; font-family: 'Lucida Console', monospace; color:#795548;">
[Link] Student in AI and DS<br>
Email: <a href="[Link]
</p>
<h2 class="section-title">Education</h2>
<ul>
<li>College: Dr Akhilesh Das Gupta Institute Of Professional Studies</li>
<li>Schooling (till Xth): Darbari Lal D.A.V Model School</li>
<li>Till XIIth: Bal Vidya Model School</li>
</ul>
<h2 class="section-title">Skills</h2>
<ol>
<li>Graphic Designing</li>
<li>Programming Languages: HTML, CSS, C</li>
<li>Idea Development and Research Skills</li>
</ol>
<h2 class="section-title">Experience</h2>
<table>
<tr>
<th>Position</th>
<th>Company</th>
<th>Duration</th>
</tr>
<tr>
<td>Outreaching Intern</td>
<td>Go Digital Agency</td>
<td>2 Months</td>
</tr>
</table>
<h2 class="section-title">Projects</h2>
<ul>
<li><strong>NFC Payment Card Prototype Design</strong> – Built concept model of contactless transaction card
using NodeMCU & RFID.</li>
<li><strong>CreoVault Studio</strong> – Built digital service showcase for agency clients.</li>
<li><strong>[Link]</strong> – Designed an AI-based emergency detection system for vehicles.</li>
</ul>
<h2 class="section-title">Achievements</h2>
<ul>
<li>Presented Startup Concept at IIT Roorkee, IIT Kharagpur and SRCC.</li>
<li>Selected as Class Representative for maintaining discipline and academic support in school.</li>
</ul>
</div>
</body>
</html>
EXPERIMENT- 2
AIM- CREATE A WEB PAGE THAT DISPLAYS BRIEF DETAILS OF VARIOUS PROGRAMMING LANGUAGES USING
VARIOUS TYPES OF CSS.
CODE-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Programming Languages Overview</title>
<style>
body {
background-color: #e0f7fa;
font-family: Arial, sans-serif;
color: #2e2e2e;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
.container {
width: 90%;
max-width:800px;
background-color:#ffffff;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 4px 12px rgba(0,0, 0, 0.2);
display: grid;
grid-template-columns:1fr 1fr 1fr;
gap: 20px;
text-align: center;
}
.card {
padding: 10px;
border-radius: 8px;
background-color: #f1f8e9;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.card img {
width: 80px;
height: 80px;
object-fit: contain;
margin: 10px auto;
display: block;
}
h2 {
font-size: 1.2em;
color: #00796b;
}
p{
font-size: 0.9em;
color: #424242;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<h2>Python</h2>
<img src="[Link] alt="Python Logo">
<p>Python is a high-level, versatile language used in web development, data science, and AI. It features simple
syntax, making it beginner-friendly. Basic Syntax: <code>print("Hello, World!")</code>.</p>
</div>
<div class="card">
<h2>JavaScript</h2>
<img src="[Link] alt="JavaScript Logo">
<p>JavaScript is a powerful language for web development, enabling dynamic, interactive web pages. Popular for
front-end and back-end with [Link]. Basic Syntax: <code>[Link]("Hello, World!")</code>.</p> </div>
<div class="card">
<h2>C++</h2>
<img src="[Link] alt="C++ Logo">
<p>C++ is a compiled, high-performance language used in system programming, game development, and embedded
systems. Basic Syntax: <code>std::cout<< "Hello, World!";</code>.</p>
</div>
</div>
</body>
</html>
EXPERIMENT-3
AIM- CREATE A WEBPAGE USING JAVASRIPT AND HTML TO DEMONSTRATE SIMPLE CALCULATOR APPLICATION.
CODE-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Calculator</title>
<style>
/* General page styling */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
display: flex;
justify-content: center; align-
items: center; height: 100vh;
margin: 0;
}
/* Calculator container styling */
.calculator {
background-color: #333;
border-radius: 10px; padding:
20px;
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2);
}
/* Display styling */
#display {
background-color: #222;
color: white;
font-size: 2em;
border: none;
padding: 10px;
text-align right;
margin-bottom:20px;
width: 100%;
border-radius: 5px;
}
/* Button grid styling */
.button-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
}
/* Button styling */
.button {
background-color: #444;
color: white;
font-size: 1.5em;
padding: 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
/* Specific button colors */
.[Link] { background-
color: #007bff;
}
.[Link]:hover {
background-color: #0056b3;
}
.[Link] {
background-color: #555;
}
.[Link]:hover {
background-color: #777;
}
.[Link] {
background-color: #000;
}
.[Link]:hover {
background-color: #333;
}
/* Equal button style */
.[Link] { grid-
column: span 2;
}
</style>
</head>
<body>
<!-- Calculator structure -->
<div class="calculator">
<!-- Display area -->
<input type="text" id="display" disabled>
<!-- Buttons area -->
<div class="button-grid">
<button class="button grey" onclick="clearDisplay()">C</button>
<button class="button grey" onclick="deleteDigit()">←</button>
<button class="button grey" onclick="appendOperator('/')">÷</button>
<button class="button grey" onclick="appendOperator('*')">×</button>
CODE-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do/Grocery List</title>
<style>
body {
background-color: #1a1a1a;
color: #f5f5f5;
font-family: Arial, sans-serif;
display: flex;
justify-content:center;
align-items:center;
height: 100vh;
margin: 0;
}
.container {
background-color: #333;
padding: 20px; border-
radius: 10px; width: 90%;
max-width: 500px;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5);
}
h1 {
text-align center;
color: #ffcc00;
font-weight: bold;
margin-bottom: 20px;
input, button {
padding:10px;
margin:5px0;
border:none;
border-radius: 5px;
}
input[type="text"] {
width: calc(100% - 22px);
}
button {
cursor: pointer;
color: #333;
background-color: #ffcc00;
}
ul {
list-style: none;
padding: 0;
}
li {
background-color: #444;
padding: 10px;
margin: 5px 0;
border-radius: 5px;
display: flex;
justify-content: space-between;
align-items: center;
}
.actions button {
background-color:#ff5722;
color: white;
margin-left: 5px;
}
</style>
</head>
<body>
<div class="container">
<h1>To-Do / Grocery List</h1>
<input type="text" id="itemInput" placeholder="Add new item...">
<button onclick="addItem()">Add Item</button>
<ul id="itemList"></ul>
</div>
<script> let
items = [];
function displayItems() {
const list = [Link]('itemList');
[Link] = ''; [Link]((item, index) => {
[Link] += `
<li>
<span>${item}</span>
<div class="actions">
<button onclick="editItem(${index})">Edit</button>
<button onclick="deleteItem(${index})">Delete</button>
</div>
</li>’;
});
}
function addItem() {
const input = [Link]('itemInput');
if ([Link]()) { [Link]([Link]());
[Link] = ''; displayItems();
}
}
function editItem(index) {
const newItem = prompt("Update item:", items[index]);
if (newItem) {
items[index] = [Link](); displayItems();
}
}
function deleteItem(index) {
[Link](index,1);
displayItems();
}
displayItems();
</script>
</body>
</html>
EXPERIMENT-5
AIM-CREATE A JAVA SCRIPT APPLICATIONS BASED ON VARIOUS DATA TYPES, STATEMENTS, KEYWORDS AND
OPERATORS.
CODE-
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Data Types and Operators Example</title>
</head>
<body>
<h2>JavaScript Application: Data Types, Statements, Keywords and Operators</h2>
<pre id="output"></pre>
<script>
// Output area
let result = "";
// ===== DATA TYPES =====
let num = 25; // Number
let name = "Ayush"; // String
let isStudent = true; // Boolean
let numbers = [10, 20, 30]; // Array
let person = {name: "Ayush", age: 21}; // Object
let nothing = null; // Null
let unknown; // Undefined
// if-else
if (num > 20) {
result += "if-else: Number is greater than 20\n";
} else {
result += "if-else: Number is 20 or less\n";
}
// switch
switch (b) {
case 1: result += "switch: b is 1\n"; break;
case 5: result += "switch: b is 5\n"; break;
default: result += "switch: b is something else\n";
}
// loop
result += "Loop (for): ";
for (let i = 0; i < 3; i++) {
result += i + " ";
}
result += "\n\n";
// ===== FUNCTIONS (keyword: function, return) =====
function multiply(x, y) {
return x * y;
}
result += "=== FUNCTION ===\n";
result += "multiply(4, 5) = " + multiply(4, 5) + "\n";
// Show output
[Link]("output").innerText = result;
</script>
</body>
</html>
EXPERIMENT-6
AIM-CREATE A JAVA SCRIPT APPLICATIONS WITH WINDOWS OBJECTS AND DOCUMENT OBJECT.
CODE-
<!DOCTYPE html>
<html>
<head>
<title>Window and Document Object Example</title>
<script>
// Function using Window object
function showWindowInfo() {
// window object properties
alert("Window width: " + [Link] + "px\n" +
"Window height: " + [Link] + "px\n" +
"Current URL: " + [Link]);
}
<script>
let text = "";
<button onclick="generateRandom()">Generate</button>
<div id="box"></div>
<script>
function generateRandom() {
let min = parseInt([Link]("min").value);
let max = parseInt([Link]("max").value);
</body>
</html>
EXPERIMENT-10
AIM- BUILD A UNIT CONVERTOR APPLICATIONUSING HTML AND JAVA SCRIPT.
CODE-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Simple Unit Converter</title>
<style>
body { font-family: Arial; padding: 20px; }
input, select { padding: 5px; margin: 5px 0; }
#result { margin-top: 10px; font-weight: bold; }
</style>
</head>
<body>
<h2>Simple Unit Converter</h2>
<label>Enter Value:</label><br>
<input type="number" id="value" placeholder="Enter number"><br><br>
<label>Convert From:</label><br>
<select id="fromUnit">
<option value="m">Meters</option>
<option value="km">Kilometers</option>
<option value="cm">Centimeters</option>
</select><br><br>
<label>Convert To:</label><br>
<select id="toUnit">
<option value="m">Meters</option>
<option value="km">Kilometers</option>
<option value="cm">Centimeters</option>
</select><br><br>
<button onclick="convert()">Convert</button>
<div id="result"></div>
<script>
function convert() {
let value = parseFloat([Link]('value').value);
let from = [Link]('fromUnit').value;
let to = [Link]('toUnit').value;
if (isNaN(value)) {
[Link]('result').innerText = "Please enter a valid number";
return;
}
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Object Example</title>
</head>
<body>
<h2>JavaScript Object Creation with Methods</h2>
<p id="result"></p>
<script>
// Object creation
let car = {
brand: "Maruti",
model: "Swift",
year: 2020,
speed: 0,