2026-01-14
MKL Day]!Introduction to Web Mechanics and HTML
The TCP/IP internet protocols are abstracted into a four-layer stack:
DNS Overview: DNS maps human-readable domain names to numeric IP addresses.
Example Domain Structure:
www.cs.willamette.edu
│ │ │ │
│ │ │ └─ Top-level domain (TLD)
│ │ └────────────── Second-level domain (SLD)
│ └───────────────── Third-level domain
└───────────────────── Subdomain (www)
http://www.funwebdev.com:8080/index.php?page=17#article
│ │ │ │ │ │
│ │ │ │ │ └─ Fragment
│ │ │ │ └────────── Query String
│ │ │ └──────────────────── Path
│ │ └───────────────────────── Port
│ └────────────────────────────────────────── Domain
└───────────────────────────────────────────────── Protocol
http.www.funwebdev.com on port 8080 (Default HTTP is 80).index.php (The location of the file on the server).?page=17 (Passes information to the server via key-value pairs).#article (Requests a specific portion of a page).HTTP Requests: HTTP establishes a TCP connection (usually on port 80).
A web server is a computer that responds to HTTP requests, often grouped in web farms.
HTML (Hypertext Markup Language) annotates documents to distinguish content from structure.
<a href="http://centralpark.com">Central Park</a>.href or src) providing extra info.<img> or <br>.<html>
<head>
<title>Page Title</title>
</head>
<body>
<header>
<h1>Welcome</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>
</header>
<main>
<p>Content goes here.</p>
</main>
</body>
</html>Correct Nesting: <p><strong>Text</strong></p> ✓
Incorrect Nesting: <p><strong>Text</p></strong> ✗
HTML should describe meaning and structure, while CSS handles visual presentation.
<html>: The root element.<head>: Contains metadata (title, character set, stylesheets, etc.).<body>: Contains the visible content.Basic HTML5 Template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Welcome to HTML5</h1>
<p>This is a basic HTML5 document structure.</p>
</body>
</html><h1> to <h6>) describing document structure.<p> for paragraphs; <div> for block-level grouping (no intrinsic semantic value).<ul>): Bulleted items.<ol>): Numbered sequence.<dl>): Name/value pairs.<a>, <strong>, <em>, <span>, <time>).© for ©, < for <).<!-- Unordered List -->
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<!-- Ordered List -->
<ol>
<li>Learn HTML basics</li>
<li>Study CSS styling</li>
<li>Practice JavaScript</li>
</ol>
<!-- Description List -->
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
</dl>Links are created using the anchor (<a>) element, requiring a destination and a label.
https://google.com).index.html.images/logo.gif.../about.html./index.html.<!-- Absolute URL (external site) -->
<a href="https://www.google.com">Visit Google</a>
<!-- Relative URL (same directory) -->
<a href="about.html">About Us</a>
<!-- Relative URL (child directory) -->
<a href="images/photo.jpg">View Photo</a>
<!-- Relative URL (parent directory) -->
<a href="../index.html">Back to Home</a>
<!-- Root-relative URL -->
<a href="/contact.html">Contact</a>
<!-- Link to fragment (same page) -->
<a href="#section2">Jump to Section 2</a>
<!-- Email link -->
<a href="mailto:info@example.com">Email Us</a>Modern HTML5 replaces div with descriptive block elements that define the page layout:
<header> & <footer>: Page or section boundaries.<nav>: Navigation links.<main>: The unique primary content of the document.<section> & <article>: Thematic groupings or self-contained compositions.<aside>: Content tangentially related to surrounding content.<figure> & <figcaption>: Essential content (like images) that could be moved elsewhere and still make sense.<details> & <summary>: Creates interactive “accordions” without needing JavaScript.<!DOCTYPE html>
<html lang="en">
<body>
<header>
<h1>My Website</h1>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<article>
<h2>Article Title</h2>
<p>This is the main content of the article.</p>
<figure>
<img src="image.jpg" alt="Description">
<figcaption>Image caption here</figcaption>
</figure>
</article>
<aside>
<h3>Related Links</h3>
<p>Additional information or sidebar content.</p>
</aside>
</main>
<footer>
<p>© 2026 My Website. All rights reserved.</p>
</footer>
</body>
</html><!-- Details and Summary (Accordion) -->
<details>
<summary>Click to expand</summary>
<p>This content is hidden until you click the summary.</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</details>
<details open>
<summary>This one starts expanded</summary>
<p>The 'open' attribute makes this visible by default.</p>
</details>