Fundamentals of the Web and HTML
The terms Internet and Web are often used interchangeably, but they refer to distinct layers of the global network.

When a user types a query into a search engine, which component first receives the HTTP request?
Which HTML tag is used to define a paragraph and must be closed with a matching end tag?
In CSS, what does the selector "div" target?
Which of the following statements about cookies is accurate?
During the indexing phase of a search engine, what is primarily stored in the database?
Which HTML element is considered a block‑level element and forces a line break before and after it?
What is the primary purpose of the tag inside the section?
Which of the following best explains why the tag is used instead of ?
In the context of web security, what does the 'S' in HTTPS stand for?
Understanding the Internet and the World Wide Web
The terms Internet and Web are often used interchangeably, but they refer to distinct layers of the global network.
- Internet: The physical infrastructure—cables, routers, and protocols—that transports data between computers worldwide.
- World Wide Web (WWW): An application layer that uses the HTTP protocol to deliver hypertext documents (web pages) over the Internet.
Think of the Internet as the highway system and the Web as the fleet of cars that travel on it, delivering passengers (information) to specific destinations.
How Search Engines Process a User Query
Step‑by‑step Flow
When a user enters a search term, the following components are involved:
- Browser sends an HTTP request to the search engine’s server.
- The search engine server receives the request first, parses the query, and decides which internal services to invoke.
- Back‑end services (crawlers, indexers, ranking algorithms) retrieve matching documents from the index.
- The server returns an HTML response that the browser renders.
Note that client‑side JavaScript may enhance the user experience, but the initial HTTP request is always handled by the search engine’s server.
Fundamental HTML Elements
Paragraphs: The <p> Tag
Paragraphs are the building blocks of readable content. The correct syntax is:
<p>Your text goes here.</p>
Both opening <p> and closing </p> tags are required. Unlike self‑closing tags such as <br> or <img>, omitting the closing tag can cause unexpected layout issues.
Block‑Level vs. Inline Elements
HTML elements are categorized by how they affect the document flow.
- Block‑level elements (e.g.,
<div>,<h2>,<p>) start on a new line and stretch to the full width of their container. - Inline elements (e.g.,
<span>,<a>,<img>) flow within the surrounding text without forcing line breaks.
For example, <div> is a block‑level element that forces a line break before and after it, making it ideal for grouping sections of a page.
CSS Selectors: Targeting Elements
CSS selectors define which HTML elements a set of style rules applies to. The selector div targets all <div> elements in the document, regardless of class or ID.
div {
background-color: #f0f0f0;
padding: 10px;
}
If you need to style a specific element, you can combine selectors with classes (.myClass) or IDs (#myId).
Meta Tags and Character Encoding
The <meta charset="utf-8"> Tag
Placed inside the <head> section, this tag declares the document’s character encoding. Using UTF‑8 ensures that virtually all characters—from Latin alphabets to emojis—are displayed correctly.
<head>
<meta charset="utf-8">
<title>My Web Page</title>
</head>
Without this declaration, browsers may misinterpret characters, leading to garbled text.
Cookies: Small Data Packages for State Management
Cookies are tiny text files stored on a user’s device. They enable websites to remember information across requests, such as login sessions, language preferences, or shopping‑cart contents.
- Created via the
Set-CookieHTTP header or JavaScript’sdocument.cookieAPI. - Typically limited to 4 KB per cookie and a maximum of 20‑50 cookies per domain.
- Not mandatory for all sites, but essential for personalized experiences.
Cookies are distinct from images or binary files; they store only plain‑text key/value pairs.
Search Engine Indexing Basics
During the indexing phase, a search engine’s crawler visits web pages, extracts meaningful content, and stores it in a structured database.
- Significant words (tokens) are extracted, filtered (stop‑words removed), and linked to the URLs where they appear.
- The full HTML source is usually not stored; instead, the engine keeps a compressed representation of the text and its location.
- Multimedia files and user search histories are handled by separate subsystems, not the primary index.
This token‑to‑URL mapping enables fast retrieval when a user submits a query.
Putting It All Together: A Simple HTML Page Example
Below is a minimal, well‑structured HTML document that incorporates the concepts discussed:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fundamentals of the Web</title>
<style>
div { margin: 20px; padding: 10px; background: #e8f5e9; }
</style>
</head>
<body>
<div>
<h2>Welcome to the Web</h2>
<p>The Internet provides the infrastructure; the Web delivers content.</p>
</div>
<div>
<p>Your first paragraph uses the <code><p></code> tag and must be closed with <code></p>.</p>
</div>
</body>
</html>
This example demonstrates proper use of the <meta charset> tag, block‑level <div> containers, and paragraph tags.
Key Takeaways for Beginners
- The Internet is the underlying network; the Web is an application that runs on it.
- Search engine queries are first processed by the server, not by client‑side scripts.
- Use
<p>…</p>for paragraphs and always close block‑level tags. - CSS selectors like
divtarget all elements of that type. - Cookies store small text snippets to maintain state across page loads.
- During indexing, search engines store significant words linked to their locations, not the entire HTML source.
- The
<meta charset="utf-8">tag ensures correct character rendering.
Mastering these fundamentals provides a solid foundation for deeper web development and SEO optimization.
