Posts

Showing posts from March, 2025

Registration form

 <!DOCTYPE html><html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Student Registration Form</title></head> <body><h2>Student Registration Form</h2> <form action="submit_form.html" method="post">     <label for="name">Full Name:</label>     <input type="text" id="name" name="name" required>     <label for="email">Email:</label>     <input type="email" id="email" name="email" required>     <label for="phone">Phone Number:</label>     <input type="tel" id="phone" name="phone" required>     <label for="dob">Date of Birth:</label>     <input type="date" id="dob...

Simple calculator

 <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title> </head> <body>     Enter a Number 1:<input type="text" id="number1" ><br>     Enter a Number 2:<input type="text" id="number2" ><br>     Result:<input type="text" id="result" ><br>     <input type="button" value="+" onclick="calc('+')">     <input type="button" value="-" onclick="calc('-')">     <input type="button" value="/" onclick="calc('/')">     <input type="button" value="x" onclick="calc('x')"> </body> <script> function calc(operator){     ...

Swapping

 <!DOCTYPE html> <html lang="en"> <head> <title>Swapping</title> </head> <body> <script> var a=5; var b=4; var t; document.write("Before swap"+"<br>"); document.write("a:"+a+"<br>"); document.write("b:"+b+"<br>"); t=a; a=b; b=t; document.write("After swap"+"<br>"); document.write("a:"+a+"<br>"); document.write("b:"+b); </script> </body> </html>

Table

 <!DOCTYPE html><html lang="en"> <head><title>Student Marks Table</title> </head> <body><h2>Student Marks Table</h2> <table>     <tr>         <th>Student ID</th>         <th>Name</th>         <th>Math</th>         <th>Science</th>         <th>English</th>         <th>Total Marks</th>     </tr>     <tr>         <td>101</td>         <td>Alice</td>         <td>85</td>         <td>90</td>         <td>88</td>         <td>263</td>     </tr>     <tr>       ...

Calculator

 <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title> </head> <body>     Enter a Number 1:<input type="text" id="number1" ><br>     Enter a Number 2:<input type="text" id="number2" ><br>     Result:<input type="text" id="result" ><br>     <input type="button" value="+" onclick="calc('+')">     <input type="button" value="-" onclick="calc('-')">     <input type="button" value="/" onclick="calc('/')">     <input type="button" value="x" onclick="calc('x')"> </body> <script> function calc(operator){     ...

Menu card

 body {     font-family: Arial, sans-serif;     background-color: #f8f8f8;     margin: 0;     padding: 0; } <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Restaurant Menu</title>     <link rel="stylesheet" href="styles.css"> </head> <body>     <div class="menu">         <h1>Restaurant Menu</h1>         <div class="menu-section">             <h2>Appetizers</h2>             <div class="menu-item">                 <span>Garlic Bread</span>                 <span>$5.99</span>     ...

Arithmetic Operation

<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Arithmetic Operations</title> </head> <body>     <h2>Arithmetic Operations</h2>          <label for="num1">Enter Number 1:</label>     <input type="number" id="num1">          <label for="num2">Enter Number 2:</label>     <input type="number" id="num2">     <br><br>     <label for="operation">Choose Operation:</label>     <select id="operation">         <option value="add">Addition (+)</option>         <option value="subtract">Subtraction (-)</option>         <option value="multiply"...