--- title: "BE101 · What runs behind a website" publisher: Maestro College (Maestro Open) lessons: 39 source: https://open.maestrocollege.edu/what-runs-behind-a-website full: https://open.maestrocollege.edu/what-runs-behind-a-website/llms-full.txt --- # What runs behind a website (BE101) How the web works, from requests and servers to building pages with HTML, CSS and JavaScript. ## Course objectives - How the web works: clients, servers, DNS, URLs, and HTTP - Structuring pages with HTML - Styling pages with CSS and the box model - Interactivity with JavaScript and the DOM - Fetching and displaying data from web APIs ## Course teaching approach - Start from a real-world problem, then introduce the concept as the solution. - Keep it true beginner level, hands-on, a little gamified. The learner should feel they are winning. - Balance explanation, demonstration and practice. No copy-paste exercises: give small story-based tasks. - End with one fun closed question about the topic. ## Lessons ### Unit 1: How the web works #### 1. Clients and servers - Recognize that the internet connects many computers, and that each is identified by a unique IP address. - Explain the different responsibilities of a client and a server, and where you would find each (home vs server farm) - Trace a high-level web interaction: the client sends a request, the server processes it, and the client receives a response to display (as HTML code). Teaching notes: Do not cover DNS or the internal structure of HTTP yet. #### 2. DNS and finding servers - Identify how DNS translates a domain name into an IP address. - Trace the role of DNS in the process of loading a web page. - Use a simple DNS lookup tool to find the IP address for a domain name. Teaching notes: Show an illustration that animates the DNS phase in communicatins with a web server: the browser sends domain to DNS resolver, and only after getting an answer, it sends the request to the server. #### 3. URLs up close - Break down a URL into its components: protocol, domain, path, and query parameters. - Construct a URL with specific path and query parameters given a set of requirements. Teaching notes: you can use a real webpage url that accepts a get parameter and ask students to change it #### 4. HTTP requests and responses - Recognize that HTTP is the protocol used to send requests and receive responses between a client and a server. - Identify the key parts of an HTTP request (method, URL, headers) and an HTTP response (status code, headers, data). - Predict the type of HTTP method (GET vs. POST) for a given user action. Teaching notes: Show an illustration that shows an animated HTTP exchange: a request flying from browser to server with labeled parts (method, URL, headers), then a response returning with labeled parts (status code, headers, data). #### 5. Seeing requests in the browser - Recognize DevTools as the browser's built-in tools for inspecting and understanding what a page is doing behind the scenes. - Use the browser's Network tab to observe HTTP requests and responses, identifying the method, URL, status code, and response body. - Categorize HTTP status codes by their meaning (2xx success, 3xx redirect, 4xx client error, 5xx server error) by observing real requests. Teaching notes: Guide the student to open DevTools in their Chrome browser and load a real website while watching the Network tab. Point out that different requests can return different kinds of response bodies, including HTML and JSON. #### 6. HTML and JSON as response data - Recognize that an HTTP response body can contain different kinds of data, including HTML and JSON. - Identify HTML as the text format browsers render into visible web pages. - Understand that JSON is structured data sent on the web, relating JSON at a high level to JavaScript objects or Python dictionaries. Teaching notes: No coding in this lesson. #### 7. Setting up your developer tools - Install VS Code, get to know its interface, create a project folder, and save a new file with a specific file extension. - Open a saved file from the filesystem in a web browser. Teaching notes: Students install and use VS Code for the first time, outside the platform's editor. #### 8. See HTML come alive in the browser - Identify the basic structure of an HTML element: opening tag, content, and closing tag. - Create code of a minimal HTML file with a heading and a paragraph in VS Code and open it in a browser to see it render. - Install Live server extension in VS Code and use it to open the HTML file in a browser. - Identify that the browser reads the HTML file and builds the visible page from it, so we don't see the actual code in the browser. Teaching notes: Uses the Live Server extension. HTML is taught properly in Unit 2. #### 9. The life of a web request - Understand the complete journey of a web request from typing a URL in the browser to a rendered page, including DNS, IP, HTTP, and the server response. - Identify where things can go wrong at each step of the journey. Teaching notes: Have the student open DevTools Network tab and trace a real page load step by step, mapping each request to the concepts from this unit (DNS, HTTP method, status code, response body). ### Unit 2: Building with HTML and CSS #### 10. How HTML works - Identify the difference between an HTML element and a tag, including opening tags, closing tags, and void elements that do not require a closing tag (e.g., ,
). - Use attributes (href, alt) to configure HTML elements and identify the name="value" pattern. Teaching notes: Start by defining HTML as the language that gives a page its structure — not its appearance. Introduce the concept of a tag (

), an element (opening tag + content + closing tag), and self-closing tags (,
). Then introduce attributes as name="value" pairs that configure elements. Use href, src, and alt as examples. #### 11. Your first real HTML page - Create a valid HTML document with the essential structure (doctype, html, head, body). - Introduce headings, paragraphs and link elements and learn how to add them to the HTML page. Teaching notes: Images come in the next lesson. #### 12. Images and lists - Add images to a page using the img element with src and alt attributes. - Use ordered and unordered lists to organize related items on a page. Teaching notes: Use a public url of an image (https://upload.wikimedia.org/wikipedia/commons/e/e1/FullMoon2010.jpg), local image is optional. Discuss why alt text matters for accessibility. Then introduce