NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

html table
<!DOCTYPE html>
<html>
<head>
<title>Class Timetable</title>
</head>
<body>
<h1>Class Timetable</h1>
<table border="1">
<tr>
<th>Time</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
</tr>
<tr>
<td>8:00 AM - 9:00 AM</td>
<td>Class A</td>
<td>Class B</td>
<td>Class C</td>
<td>Class D</td>
<td>Class E</td>
</tr>
<tr>
<td>9:00 AM - 10:00 AM</td>
<td>Class B</td>
<td>Class C</td>
<td>Class D</td>
<td>Class E</td>
<td>Class A</td>
</tr>
</table>
</body>
</html>

Email Registration Form
<!DOCTYPE html>
<html>
<head>
<title>Email Registration Form</title>
</head>
<body>
<h1>Email Registration</h1>
<form>
<label for="full_name">Full Name:</label>
<input type="text" id="full_name" name="full_name" required><br><br>

<label for="email">Email Address:</label>
<input type="email" id="email" name="email" required><br><br>

<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>

<label for="confirm_password">Confirm Password:</label>
<input type="password" id="confirm_password" name="confirm_password" required><br><br>

<input type="submit" value="Register">
</form>
</body>
</html>
css
<!DOCTYPE html>
<html>
<head>
<title>Inline CSS Example</title>
</head>
<body>
<div style="color: blue; font-size: 20px;">This is a blue text with increased font size.</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Embedded CSS Example</title>
<style>
.text-style {
color: red;
font-size: 18px;
}
</style>
</head>
<body>
<div class="text-style">This is red text with a font size of 18px.</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>External CSS Example</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="text-style">This is red text with a font size of 18px.</div>
</body>
</html>
.text-style {
color: red;
font-size: 18px;
}

form bootstrap
<!DOCTYPE html>
<html>
<head>
<title>Simple Bootstrap Form</title>
<!-- Include Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1>Simple Bootstrap Form</h1>
<form>
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" id="name" placeholder="Enter your name">
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email" placeholder="Enter your email">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</body>
</html>

webpage validation JavaScript
<!DOCTYPE html>
<html>
<head>
<title>Simple Form Validation</title>
</head>
<body>
<h1>Simple Form Validation</h1>
<form id="myForm" onsubmit="return validateForm()">
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>

<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>

<button type="submit">Submit</button>
</form>

<script>
function validateForm() {
var name = document.getElementById('name').value;
var email = document.getElementById('email').value;

if (name === "") {
alert("Name must be filled out");
return false;
}

if (email === "") {
alert("Email must be filled out");
return false;
}

// You can add more complex validation logic for the email field, e.g., checking for a valid email format.

return true; // Form will be submitted if all checks pass.
}
</script>
</body>
</html>

JavaScript events
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript Events Demo</title>
<style>
#hoverDiv {
width: 100px;
height: 100px;
background-color: lightblue;
}
</style>
</head>
<body>

<!-- Mouse Events -->
<button id="clickButton">Click me</button>
<div id="hoverDiv"></div>
<p id="mouseCoords">Mouse coordinates: </p>
<p id="mouseClick">Mouse click: </p>

<!-- Keyboard Events -->
<input id="keyInput" type="text">
<p id="keyPressed">Key pressed: </p>
<p id="keyReleased">Key released: </p>
<p id="charTyped">Character typed: </p>

<script>
// Mouse Events
document.getElementById("clickButton").addEventListener("click", function() {
alert("Button clicked!");
});

var hoverDiv = document.getElementById("hoverDiv");
hoverDiv.addEventListener("mouseover", function() {
this.style.backgroundColor = "orange";
});
hoverDiv.addEventListener("mouseout", function() {
this.style.backgroundColor = "lightblue";
});

var mouseCoords = document.getElementById("mouseCoords");
document.addEventListener("mousemove", function(event) {
var x = event.clientX;
var y = event.clientY;
mouseCoords.textContent = "Mouse coordinates: " + x + ", " + y;
});

var mouseClick = document.getElementById("mouseClick");
document.addEventListener("mousedown", function(event) {
var button = event.button === 0 ? "Left" : event.button === 1 ? "Middle" : "Right";
mouseClick.textContent = "Mouse click: " + button;
});

// Keyboard Events
var keyInput = document.getElementById("keyInput");
keyInput.addEventListener("keydown", function(event) {
console.log("Key pressed:", event.key);
document.getElementById("keyPressed").textContent = "Key pressed: " + event.key;
});

keyInput.addEventListener("keyup", function(event) {
console.log("Key released:", event.key);
document.getElementById("keyReleased").textContent = "Key released: " + event.key;
});

keyInput.addEventListener("keypress", function(event) {
console.log("Character typed:", event.key);
document.getElementById("charTyped").textContent = "Character typed: " + event.key;
});
</script>
</body>
</html>


ajax
<!DOCTYPE html>
<html>
<head>
<title>AJAX File</title>
</head>
<body>
<h2>AJAX File Example</h2>
<p id="demo">Let AJAX change this text.</p>
<button type="button" onclick="loadDoc()">Change Content</button>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
} else {
document.getElementById("demo").innerHTML = "Error: " + this.status;
}
}
};
xhttp.open("GET", "rec.txt", true);
xhttp.send();
}
</script>
</body>
</html>

rec.txt for ajax
<hr />
<h1>Nitin Kumar</h1>
<hr />
<b>School of Computing</b> <br />
<i>Department of Computational Intelligence</i>
<br />
<i>University Building, SRMIST </i>
<br />
<i>Chennai </i>
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.