Important Notice:

Month: June 2024

Practical Set 6 Question 3

Write HTML code to demonstrate the use of Anchor Tag for the following:-Creating a web link that opens in a new window.Creating a web link that opens in the same window.Reference within the same html document.Reference to some image.Making an image a hyperlink to display second image.<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 1 Question 2</title></head><body>            <h1><a href="https://nielitexam.co.in" target="_blank">O level Test Site</a></h1><br>            <h1><a href="https://www.olevelnotes.com" target="_self">O level Notes Site</a></h1><br>            <h1><a href="#img">Goto Image Area</a></h1><br>            <h1><a href="image/notes logo.png"><img src="image/small.jpg"></a></h1><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <hr color=red size=5><hr color=green size=5><h2 align="center"><a name="img">Welcome to Image World</h3><hr color=green size=5><hr color=red size=5><img src="image/Calc.png" height="450"><img src="image/HTML 5.png"…

Practical Set 6 Question 2

Create a HTML page with following specifications            Title should be about my City. Place your City name at the top of the page in large text and in blue color. Add names of landmarks in your city each in a different color, style and typeface. One of the landmarks, your college name should be blinking. Add scrolling text with a message of your choice.<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 6 Question 2</title><style type="text/css">      span{            font-size:30px;            animation-name: blink;            animation-duration: 2s;            animation-iteration-count: infinite;      }@keyframes blink{      0%{opacity:0; color:black;}      100%{opacity:0.5;color:red;}}</style></head><body>            <h1><font color="blue" size="7">My City</font></h1>            <h3 style="color:red;">Azamgarh to Lucknow <span>Gandhi Satapdi PG College</span></h3> <h3 style="color:blue;">Azamgarh to Gorakhpur</h3>            <h3 style="color:green;">Azamgarh to Prayagraj</h3>            <h3 style="color:orange;">Azamgarh to Mau</h3>            <h3 style="color:pink;">Azamgarh to Gazipur</h3>            <h3 style="color:purple;">Azamgarh to Varanasi</h3><marquee><font color="red" size="7"><q>Work is…

Practical Set 6 Question 1

Write a JavaScript to design a simple calculator to perform the following operations: sum, product, difference and quotient.<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 6 Question 1</title></head><body>            First Number : <input type="text" name="num1" placeholder="Enter First Number" id="n1"><br><br>            Second Number : <input type="text" name="num1" placeholder="Enter Second Number" id="n2"><br><br>            Total Result : <input type="text" name="num1" placeholder="output" id='result'><br><br>            <input type="submit" name="sub" value="Sum" onclick="add()">            <input type="submit" name="sub" value="Product" onclick="mul()">            <input type="submit" name="sub" value="Subtraction" onclick="sub()">            <input type="submit" name="sub" value="Quotient" onclick="div()">        <script type="text/javascript">      function add(){            var num1=document.getElementById("n1").value;            var num2=document.getElementById("n2").value;            var num1=parseInt(num1);            var num2=parseInt(num2);            var sum=num1+num2;            document.getElementById('result').value=sum;      }      function mul() {                  var num1=document.getElementById("n1").value;                  var num2=document.getElementById("n2").value;                  document.getElementById('result').value=num1*num2;      }      function sub() {                  var num1=document.getElementById("n1").value;                  var num2=document.getElementById("n2").value;                  document.getElementById('result').value=num1-num2;      }      function div() {                  var num1=document.getElementById("n1").value;                  var num2=document.getElementById("n2").value;                  document.getElementById('result').value=num1/num2;     …

Practical Set 5 Question 3

Write a HTML code using CSS to create a job application form having following details:Personal Information (First Name, Middle Name, Last Name, Gender, Address & Phone Number)Education Details (10th, 12th, Graduation & Others)Experience (in months)<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 5 Question 3</title><style type="text/css">fieldset{      width: 90%;}   div{            width: 50%;            margin:10px auto;            border:1px solid red;            padding: 10px;            background-color: rgba(125, 245, 155, 0.6);}</style></head><body>      <div>            <h1 align="center">Job Application Form</h1>            <form>                        <fieldset>                                    <legend>Personal Details</legend>      First Name : <input type="text" name="fname" placeholder="Enter First Name">      Middle Name : <input type="text" name="mname" placeholder="Enter Middle Name">            Last Name : <input type="text" name="lname" placeholder="Enter Last Name">         <br><br>           Gender : <input type="radio" name="gender">Male        <input type="radio" name="gender">Female<br><br>           Phone No : <input type="text" name="phone" placeholder="Enter Mobile No."><br><br>          Address : <br>                  <textarea cols="35" rows="7"></textarea>      </fieldset>       <br><fieldset>      <legend>Education Details</legend>      <table border="1" cellspacing="0" width="60%" height="210px">      <tr>            <th> Class </th>            <th> Board/University </th>            <th> Passing Year </th>            <th> Division </th>      </tr>      <tr  align="center">      <td>10th</td>      <td><input type="text" name="fname" placeholder="Enter Board/University"></td>      <td> <input type="text" name="fname" placeholder="Enter Passing Year"></td>      <td> <input type="text" name="fname" placeholder="Enter Division"></td>      </tr>      <tr  align="center">      <td>12th</td>      <td><input type="text" name="fname" placeholder="Enter Board/University"> </td>      <td><input type="text" name="fname" placeholder="Enter Passing Year"> </td>      <td> <input type="text" name="fname" placeholder="Enter Division"></td>      </tr>      <tr  align="center">      <td>Graduation</td>      <td><input type="text" name="fname" placeholder="Enter Board/University">  </td>      <td> <input type="text" name="fname" placeholder="Enter Passing Year"></td>      <td> <input type="text" name="fname" placeholder="Enter Division"></td>      </tr>      <tr  align="center">      <td>Others</td>      <td><input type="text" name="fname" placeholder="Enter Board/University">  </td>      <td><input type="text" name="fname" placeholder="Enter Passing Year"> </td>      <td> <input type="text" name="fname" placeholder="Enter Division"></td>           </tr>      </table>      </fieldset>       <br>      Experience (in Months):          <b>96 months experience of teaching field</b><br><br>      <input type="submit" name="sub">      </form>     …

Practical Set 5 Question 2

Create an HTML file (e.g. First_page.html) that specifies a page that contains a heading and two paragraphs of text. As the texts in the heading and paragraphs you can use any texts you like.<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 5 Question 2</title></head><body>      <h1>Welcome to M2-R5 Class</h1>      <p>HTML Topic</p>      <p>CSS…

Practical Set 5 Question 1

Create a webpage, divide the webpage into six frames. In one frame create five links that will display different HTML forms in the remaining five frames respectively.Main HTML File<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 5 Question 1</title></head><frameset cols="*,*,*,*,*,*"><frame name="a1" src="frame5.html"></frame>      <frame name="b1"></frame>      <frame name="b2"></frame>      <frame name="b3"></frame>      <frame name="b4"></frame>      <frame name="b5"></frame></frameset></html>Link File<!DOCTYPE html><html><head>      <title>form</title></head><body><a href="cls10qu1.html" target="b1"><h1>Inquary Form</a></h1><a href="si.html" target="b2"><h1>Addmission</a></h1><a href="#" target="b3"><h1>Exam Form</a></h1><a href="#" target="b4"><h1>Certificate Form</a></h1><a href="#" target="b5"><h1>Feedback…

Practical Set 4 Question 3

Create a webpage and write a program in Java Script to show the reservation system of XYZ train. Assume total 3 different routes (each route is containing 3 different trains with 5 seats capacity each). The document should contain a form with radio buttons that allows user to select date and time for which reservation has to be booked. On reservation for a particular train it should prompt a message for successful entry otherwise unavailability. The program should display the output asTotal number of reservation by systemReservation per trainReservation per routeHTML Page<!DOCTYPE html><head>    <title>XYZ Train Reservation System</title>    </head><body>    <h1>XYZ Train Reservation System</h1>    <form id="reservationForm">        <label for="route">Select Route:</label>        <select id="route" name="route">            <option value="route1">Route 1</option>            <option value="route2">Route 2</option>            <option value="route3">Route 3</option>        </select>        <label for="train">Select Train:</label>        <select id="train" name="train">            <option value="train1">Train 1</option>            <option value="train2">Train 2</option>            <option value="train3">Train 3</option>        </select>        <label for="dateTime">Select Date and Time:</label>        <input type="datetime-local" id="dateTime" name="dateTime">        <button type="button" onclick="makeReservation()">Make Reservation</button>    </form>    <div id="output">    <h2>Reservation Statistics</h2>        <p>Total Reservations: <span id="totalReservations">0</span></p>        <p>Reservations per Train:</p>        <ul id="reservationsPerTrain"></ul>        <p>Reservations per Route:</p>        <ul id="reservationsPerRoute"></ul>    </div>CSS Page<style>        body {            font-family: Arial, sans-serif;            margin: 20px;        }         label {            display: block;            margin-bottom: 10px;        }         button {            margin-top: 10px;            padding: 5px 10px;            cursor: pointer;        }         #output {            margin-top: 20px;        }    </style>JavaScript Page<script>        let totalReservations = 0;        let reservationsPerTrain = {};        let reservationsPerRoute = {};        function makeReservation() {            const route = document.getElementById('route').value;            const train = document.getElementById('train').value;            const dateTime = document.getElementById('dateTime').value;            // Check if the selected train has available seats            if (reservationsPerTrain[train] === undefined) {                reservationsPerTrain[train] = 0;            }            if (reservationsPerRoute[route] === undefined) {                reservationsPerRoute[route] = 0;            }            if (reservationsPerTrain[train] < 5) {                totalReservations++;                reservationsPerTrain[train]++;                reservationsPerRoute[route]++;                alert('Reservation successful!');            } else {                alert('Sorry, the selected train is fully booked.');            }            updateReservationStatistics();        }        function updateReservationStatistics() {            document.getElementById('totalReservations').innerText = totalReservations;            const reservationsPerTrainList = document.getElementById('reservationsPerTrain');            reservationsPerTrainList.innerHTML = '';            for (const train in reservationsPerTrain) {                const listItem = document.createElement('li');                listItem.innerText = `${train}: ${reservationsPerTrain[train]}`;                reservationsPerTrainList.appendChild(listItem);            }            const reservationsPerRouteList = document.getElementById('reservationsPerRoute');            reservationsPerRouteList.innerHTML = '';            for (const route in reservationsPerRoute) {                const listItem = document.createElement('li');                listItem.innerText = `${route}: ${reservationsPerRoute[route]}`;                reservationsPerRouteList.appendChild(listItem);            }        }   …

Practical Set 4 Question 2

Write a HTML program to create a form for the subscription of a magazine. The form should contain Name, Address, City, State, Pin Code. Magazine should be selected from 5 different magazines using checkbox. Subscription is available for 1 year or two years. Radio buttons shall be sued to select subscription period. The page should have a submit button.<!DOCTYPE html><html><head>      <title>M2-R5.1 Set 4 Question 2</title><style type="text/css">      div{            width: 550px;            height:600px;            margin: 10px auto;            border:3px solid red;            padding: 15px;            background-color:rgba(150, 220, 135, 0.5);      }label{      font-family: sans-serif;      font-size: 15px;      color:red;}input[type=text]{      width:250px;      height:30px;} </style></head><body>      <div>            <h1 align="center"><font color="blue">Magzine Subscription form</font></h1><form><label>Name:</label><br><input type="text" name="uname" placeholder="Enter Your Name"><br><br><label>Address:</label> <br><textarea cols="35" rows="6" name="address">address here....</textarea><br><br><label>City:</label><br>            <select>            <option>Azamgarh</option>            <option>Mau</option>            <option>Gazipur</option>            <option>Balia</option>            <option>Varanasi</option>         </select><br><br>      <label>State:</label><br>            <select>            <option>UP</option>            <option>MP</option>            <option>Delhi</option>            <option>Bihar</option>            <option>Punjab</option>            </select><br><br>      <label>Pin Code:</label> <br>      <input type="text" name="pin" placeholder="Enter Pin Code"><br><br>      <label>Select Magzine:</label><br>      <input type="checkbox" name="one"> Meri Saheli <input type="checkbox" name="two"> Akhand Jyoti <input type="checkbox" name="three"> Champak <input type="checkbox" name="four"> Grihshobha <input type="checkbox" name="five"> Kadambini<br><br>      <label>Select subscription period: </label><br>      <input type="radio" name="period">1 Year <input type="radio" name="period">2 Years<br><br>      <input type="submit" name="sub">     …

Practical Set 4 Question 1

Write HTML code to generate following outputCoffeeTeaBlack TeaGreen TeaMilk<!DOCTYPE html><html><head>     <title>M2-R5.1 Set 4 Question 1</title></head><body>          <ol>                   <li>Coffee</li>                   <li>Tea</li>                   <li>Black Tea</li>                   <li>Green Tea</li>                   <li>Milk</li>         …

Practical Set 3 Question 3

Create a webpage and write a program in java script to show the result of student attendance on weekly basis for xyz subject. A total of 5 classes can be conducted in a week. The document should contain a form with radio buttons that allows teacher to select status of absence or presence for 5 students of class. The page also allows selecting data and time for which attendance is to be marked. On submitting attendance for a particular day it should prompt a message for successful entry. The program should display the output as:Total number of classes attended out of total number of classes conducted for each student.%age of attendanceButtons should be enabled and disabled as per conditions.HTML Page <!DOCTYPE html><head>     <title> M2-R5.1 Set 3 Question 3</title>    </head><body>    <h1>XYZ Subject Attendance</h1>    <form id="attendanceForm">        <label for="dateTime">Select Date and Time:</label>        <input type="datetime-local" id="dateTime" name="dateTime" required>        <label>Student 1:            <input type="radio" name="attendance1" value="present" required> Present            <input type="radio" name="attendance1" value="absent" required> Absent        </label>        <label>Student 2:            <input type="radio" name="attendance2" value="present" required> Present            <input type="radio" name="attendance2" value="absent" required> Absent        </label>        <label>Student 3:            <input type="radio" name="attendance3" value="present" required> Present            <input type="radio" name="attendance3" value="absent" required> Absent        </label>        <label>Student 4:            <input type="radio" name="attendance4" value="present" required> Present            <input type="radio" name="attendance4" value="absent" required> Absent        </label>        <label>Student 5:            <input type="radio" name="attendance5" value="present" required> Present            <input type="radio" name="attendance5" value="absent" required> Absent        </label>        <button type="button" onclick="submitAttendance()">Submit Attendance</button>    </form>    <div id="output">        <h2>Attendance Summary</h2>        <p>Total Classes Attended:</p>        <ul id="totalClassesAttended"></ul>        <p>Percentage of Attendance:</p>        <ul id="attendancePercentage"></ul>    </div> CSS Page     <style>        body {            font-family: Arial, sans-serif;            margin: 20px;        }        label {            display: block;            margin-bottom: 10px;        }        button {            margin-top: 10px;            padding: 5px 10px;            cursor: pointer;        }    </style> JavaScript Page<script>        const attendanceData = {            student1: { attended: 0, total: 0 },            student2: { attended: 0, total: 0 },            student3: { attended: 0, total: 0 },            student4: { attended: 0, total: 0 },            student5: { attended: 0, total: 0 }        };        function submitAttendance() {            const dateTime = document.getElementById('dateTime').value;            for (let i = 1; i <= 5; i++) {                const attendanceStatus = document.querySelector(`input[name="attendance${i}"]:checked`);                if (attendanceStatus) {                    const studentKey = `student${i}`;                    attendanceData[studentKey].total++;                      if (attendanceStatus.value === 'present') {                        attendanceData[studentKey].attended++;                    }                }            }            alert('Attendance submitted successfully!');            updateAttendanceSummary();        }        function updateAttendanceSummary() {            const totalClassesAttendedList = document.getElementById('totalClassesAttended');            totalClassesAttendedList.innerHTML = '';                  const attendancePercentageList = document.getElementById('attendancePercentage');            attendancePercentageList.innerHTML = '';            for (const student in attendanceData) {                const listItem = document.createElement('li');                listItem.innerText = `${student}: ${attendanceData[student].attended} out of ${attendanceData[student].total}`;                totalClassesAttendedList.appendChild(listItem);                const percentage = (attendanceData[student].attended / attendanceData[student].total) * 100 || 0;                const percentageListItem = document.createElement('li');                percentageListItem.innerText = `${student}: ${percentage.toFixed(2)}%`;                attendancePercentageList.appendChild(percentageListItem);            }        }   …
error: Content is protected !!