The boot process involves:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Page</title>
</head>
<body>
<h1>Welcome to Foundations of Computing</h1>
<p>This course covers hardware, networking, and web design.</p>
</body>
</html>
Example: Showing the current time on button click:
<button onclick="document.getElementById('out').innerHTML = new Date();">
Show Time
</button>
<p id="out"></p>
Concept: Memory hierarchy organises storage from fastest-smallest-expensive (top) to slowest-largest-cheap (bottom).
Levels of Hierarchy:
Major components on a motherboard: CPU socket, RAM slots (DIMM), chipset, PCIe slots, SATA connectors, M.2 slot, ROM chip.
Roles of three key components:
Definition: A bus is a set of parallel conductors (wires/traces on PCB) that carry data, addresses, and control signals between computer components.
Example: Add 0101 (5) and 0011 (3). Expected result: 1000 (8).
Result: 1000 (binary) = 8 (decimal). The carry-out from bit 3 is 0, so no overflow.
Steps to represent -12:
0000 11001111 00111111 0011 + 1 = 1111 0100
Result: -12 is represented as 1111 0100 in 8-bit 2's complement.Representing 255:
To represent the number 255 in binary (1111 1111), 8 bits are required.
mkdir (e.g., mkdir reports)ls -la (lists all including hidden, with long format showing permissions)cp (e.g., cp file.txt backup/)chmod (e.g., chmod 755 script.sh)Client-Server Network: A network model where one or more powerful computers (servers) provide services, and many other computers (clients) consume those services. Communication is always client-initiated.
Role of DNS:
google.com); computers communicate using IP addresses (142.250.77.46). DNS translates domain names to IPs.<!DOCTYPE html>
<html>
<head>
<title>BookNook Online Bookstore</title>
<style>
body { font-family: sans-serif; background-color: #f4f4f9; padding: 20px; }
header { background-color: #2c3e50; color: white; padding: 15px; text-align: center; }
ul { list-style-type: square; color: #333; margin-top: 20px; }
li { padding: 5px 0; }
.container { max-width: 800px; margin: auto; background: white; padding: 20px; border-radius: 8px; }
</style>
</head>
<body>
<div class="container">
<header>
<h1>Welcome to BookNook</h1>
</header>
<h2>Book Categories</h2>
<ul>
<li>Science Fiction & Fantasy</li>
<li>Mystery & Thriller</li>
<li>Biography & Autobiography</li>
<li>Computers & Technology</li>
</ul>
</div>
</body>
</html>
Original errors corrected:
<b><i>Some text</b></i> — inner <i> tag must close before outer <b>.<BODY>, <P> — XHTML requires all element names to be lowercase.HREF — XHTML requires lowercase attributes.Corrected XHTML:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<b><i>Some text</i></b>
<p>This is a paragraph</p>
<a href="https://www.ktu.edu.in/">Visit our university website</a>
</body>
</html>
Approach: JavaScript's setInterval() function repeatedly executes a callback every 1000 ms. On each call, the current time is subtracted from the event date to compute remaining days, hours, minutes, and seconds.
<div id="timer">Loading...</div>
<script>
const eventDate = new Date('2025-12-01T09:00:00').getTime();
function updateCountdown() {
const now = new Date().getTime();
const diff = eventDate - now;
if (diff <= 0) {
document.getElementById('timer').innerHTML = 'Event has started!';
return;
}
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
document.getElementById('timer').innerHTML =
`${days}d ${hours}h ${minutes}m ${seconds}s`;
}
updateCountdown();
setInterval(updateCountdown, 1000);
</script>
1. Inline CSS: Style is applied directly to a single HTML element using the style attribute. Highest specificity.
<p style="color: red; font-size: 16px;">Inline styled paragraph</p>
2. Internal (Embedded) CSS: CSS rules are placed inside a <style> tag in the <head> section. Applies to that page only.
<style>
p { color: blue; font-size: 14px; }
</style>
3. External CSS: CSS rules are written in a separate .css file and linked using <link>. Best practice for multi-page websites.
<!-- In HTMLhead -->
<link rel="stylesheet" href="styles.css">