⬅ Previous Next ➡

2. Internet & WWW (HTML Context)

Internet & WWW (HTML Context)
  • The Internet: A global network of interconnected computers and hardware. It serves as the physical infrastructure (wires, satellites, routers) that allows data to travel globally.
  • World Wide Web (WWW): A service or software layer that runs on top of the Internet. It is a collection of documents (webpages) connected by hyperlinks and URLs.
  • Difference between Webpage and Website:
    • Webpage: A single document written in HTML (like a single page in a book).
    • Website: A collection of related webpages linked together under a unique domain name (like the whole book).
  • URL Structure (Uniform Resource Locator): ```
    • Protocol: Usually http:// or https://. It defines how data is sent.
    • Domain Name: The human-readable address (e.g., google.com) that points to a specific server.
    • Path: The specific location of a file or folder on that server (e.g., /about.html).
    ```
  • Web Browsers:
    • Browsers are software applications (like Chrome, Firefox, Safari, Edge) used to access the WWW.
    • Function: They request files from servers and render (translate) HTML/CSS code into a visual format that humans can read.
  • How they work with HTML:
    • The Browser acts as the client.
    • The Internet acts as the highway.
    • The Server stores the HTML files.
    • When you enter a URL, the browser fetches the HTML from the server and displays the Webpage.
<!-- Example of a URL Breakdown -->
Protocol: https://
Domain:   [www.sswebtechio.com/](https://www.sswebtechio.com/)
Path:     /products/index.html
Full URL: [https://www.sswebtechio.com/view-chapters.php?course=10](https://www.google.com/search?q=https://www.sswebtechio.com/view-chapters.php?course=10)
  • The Client-Server Model: This is the basic communication structure of the internet where two computers talk to each other to deliver a webpage.
  • The Client:
    • This is your device (computer, phone, or tablet) and the Web Browser (Chrome, Safari, etc.).
    • It is called the "client" because it requests services or files.
  • The Server:
    • A powerful computer that stays on 24/7 and "serves" data.
    • It stores the HTML, CSS, and Image files of a website.
    • When a request comes in, it finds the file and sends it back.
  • The Process (The Request-Response Cycle):
    • Request: You click a link or type a URL. Your browser sends a message across the internet asking for a specific HTML file.
    • Response: The server receives the message, locates the file, and sends it back to your browser.
  • Real-world Analogy:
    • Client: A customer at a restaurant (ordering food).
    • Server: The waiter (taking the order to the kitchen and bringing the food back).
    • Internet: The floor of the restaurant where the waiter walks.
<!-- Simplified Communication --> Client: "Hey Server, please send me 'index.html'." Server: "Checking... Found it! Here is the code." Browser: (Receives code and displays the website)
  • Front End (Client-Side):
    • Everything the user sees and interacts with in the browser.
    • Focuses on user interface (UI) and user experience (UX).
    • Main technologies: HTML (structure), CSS (design), and JavaScript (interactivity).
  • Back End (Server-Side):
    • The "behind-the-scenes" part that the user cannot see.
    • Focuses on databases, server logic, and application processing.
    • It handles things like logging in, processing payments, and storing user data.
  • Client and Server Scripting Languages:
    • Client-Side Scripting: Code that runs directly in the user's browser. The most common language is JavaScript.
    • Server-Side Scripting: Code that runs on the web server before the page is sent to the user. Common languages include PHP, Python, Node.js, and Ruby.
  • Responsive Web Designing:
    • An approach where a website "responds" or adjusts its layout based on the device's screen size.
    • Ensures the website looks good and is easy to use on desktops, tablets, and mobile phones.
    • Uses flexible grids, layouts, and CSS media queries.
  • Types of Websites: Static vs. Dynamic:
    • Static Websites:
      • The content is fixed and stays the same for every visitor.
      • Built mainly with HTML and CSS.
      • Fast to load but difficult to update manually for many pages.
    • Dynamic Websites:
      • The content changes based on user interaction, time, or database information (e.g., Facebook, Amazon).
      • Uses Server-Side scripting and databases to generate pages on the fly.
      • Easier to manage large amounts of content.
<!-- Front End vs Back End Summary --> Front End: HTML, CSS, JS -> "The Look" Back End: PHP, Python, SQL -> "The Brains" Result: A complete, functional Web Application
⬅ Previous Next ➡