Web Design

Web design starts with learning HTML & CSS. These are two domain specific languages, defined by W3C consortium to create web pages. In the next tutorial you can learn what is HTML and how is used to create the internet, then you learn CSS and combine the two.

The Tech Stack

Before you can implement a website you should learn syntax of HTML5. This include 3 technologies: HTML+CSS+JavaScript. We have created text articles for learning all 3 languages. HTML+CSS are mandatory. JavaScript is optional useful to create dynamic HTML pages or applications. You can deep dive now to learn each one.

  1. Learn HTML
  2. Learn CSS
  3. Learn JavaScript

When styling HTML elements with CSS, every element is laid out as a rectangular box governed by the CSS Box Model. Understanding how content dimensions interact with padding, borders, and margins prevents unexpected layout overflow and alignment bugs.

CSS Box Model showing Content, Padding, Border, and Margin layers and box-sizing behavior

Figure: The four nested layers of the CSS Box Model and the border-box sizing model.

In production stylesheets, engineers set box-sizing: border-box globally so that declared widths include padding and borders rather than expanding beyond their container:

/* Apply border-box globally so padding and border stay inside declared width */
*, *::before, *::after {
  box-sizing: border-box;
}

.card {
  width: 320px;        /* Total rendered width remains 320px */
  padding: 16px;       /* Inner spacing between content and border */
  border: 2px solid #334155;
  margin: 12px auto;   /* Outer spacing separating neighboring elements */
}

Engineering Perspective

Once you master HTML, CSS, and JavaScript, you must pivot from writing files to engineering projects. A production website requires structural planning and lifecycle management.

1. Architecture & Design Decisions

Before writing code, define the core requirements:

  • Static Sites: Best for content-heavy pages (blogs, portfolios). Low overhead, high performance.
  • SPAs (Single Page Applications): Ideal for interactive, app-like experiences. Requires managing state and browser history.
  • Project Structure: Organize by features (e.g., /components, /assets, /services) rather than just by file type.

2. Infrastructure & Deployment

A website is a living product. You must establish a disciplined engineering workflow:

  • Version Control: Use Git for every project. Your folder is not just a collection of files; it is a repository.
  • Domain & Hosting: Understand DNS management and the difference between static hosting (e.g., GitHub Pages, Netlify) and cloud infrastructure.
  • CI/CD Pipelines: Automate your build and deployment process so that pushing code triggers an automatic update to your live site.

3. Content Management

Decide where your data lives. For small projects, static JSON files suffice. For scale, you will need a Headless CMS or a database backend to decouple your content from your presentation layer.

External Resources

To keep this guide focused on fundamental concepts, I have omitted direct external links. The landscape of web development resources changes rapidly, and I encourage you to build a learning workflow that works for your specific style:

  • Official Documentation: MDN Web Docs remains the gold standard for HTML, CSS, and JavaScript. It is the most reliable resource for checking property syntax and browser compatibility.
  • AI Assistance: Tools like ChatGPT or Claude are excellent for explaining concepts in plain language, debugging specific snippets, or brainstorming layouts. Use them to clarify why a piece of code works, rather than just asking them to generate it for you.
  • Practical Application: The best way to learn is to inspect the code of websites you admire using your browser's "Developer Tools" (F12).

By combining official documentation with AI-assisted learning, you will develop a much stronger foundation than by following static links alone.

Hosting Providers

Once your project is ready, it must be deployed. "Cloud hosting" refers to running your application on remote infrastructure managed by third-party providers. As a software engineer, you must choose the right model for your project's needs.

Hosting Paradigms

Web hosting platforms trade operational control for managed convenience across three primary tiers:

  • Shared Hosting: Multiple sites share one server. Inexpensive but limited control and performance.
  • Virtual Private Server (VPS): A virtual machine with dedicated resources. Offers high control and OS-level access.
  • Container/PaaS (Platform as a Service): Abstracts the infrastructure. You provide the code (often as a container image), and the provider manages scaling, security, and runtime environments.

Top 10 Providers

We have listed below some cloud providers. Most offer a free plan. All depends on tech stack you are using and what resources your project needs to function. Not all providers cover all possible tech stack and not all are suitable for any project. Choosing a cloud provider is crucial for success of a web project. There is a cost and a learning process to endure before you can switch from one provider to another.

# Provider Primary Type Key Advantage
01VercelPaaSOptimized for frontend/modern frameworks
02NetlifyPaaSExcellent CI/CD and atomic deployments
03CloudflareCDN/ServerlessGlobal edge network and security
04GitHub PagesStaticSeamless integration with Git
05RenderPaaSEasy setup for full-stack apps
06FirebaseBaaS/ServerlessRobust backend services and databases
07RailwayPaaSZero-config infrastructure deployment
08DigitalOceanPaaS/VPSDeveloper-friendly and scalable
09LinodeVPSHigh performance and granular control
10AWSIaaSIndustry standard with massive service breadth

Modern Web Development using AI

AI has shifted from a mere coding assistant to an architectural partner. As a software engineer, you should use AI not just for code, but for planning, quality assurance, and infrastructure design.

Strategic Pre-Project Steps

Before writing a single line of code, follow these engineering steps:

  • Define Requirements: Determine if your project is a Static Site, a Single Page Application (SPA), or a complex Full-Stack application.
  • Choose Hosting Architecture: Balance the ease of PaaS (Serverless) against the control of IaaS/VPS.
  • Version Control: Initialize a Git repository immediately. Your project is a codebase, not just a folder.

AI and Hosting Strategy

AI agents are highly effective at comparing providers based on your specific technical requirements. When choosing a host, look for "agent-friendly" platforms—those with robust APIs, CLI tools, and native CI/CD integration (like Vercel, Netlify, or Railway). These allow you to automate your deployment pipeline programmatically.

Project Lifecycle

Shipping and maintaining a web application follows a repeatable four-stage operational loop:

  1. Develop: Use containerization (e.g., Docker) to ensure local consistency.
  2. Integrate: Connect source control to your cloud provider.
  3. Automate (CI/CD): Configure pipelines so git push triggers automated builds and tests.
  4. Monitor: Implement logging to catch errors in production environments.

Learning the Workflow

To master these steps, move beyond tutorials and embrace engineering practices:

  • Infrastructure-as-Code (IaC): Learn to deploy via CLI or scripts rather than clicking buttons in a dashboard.
  • System Patterns: Study the "12-Factor App" methodology for cloud-native software.
  • Learn by Managing: Deploy a VPS (e.g., Linode) and manage the OS, security, and web server yourself. This is the fastest way to understand the underlying infrastructure.

The Nix Standard: Reproducible Infrastructure

In modern web engineering, the classic "it works on my machine" problem is solved by Nix. Nix is a powerful package manager and configuration tool that treats your entire development environment as a functional, immutable declaration.

Why Nix is Superior

Compared to imperative setup scripts and mutable system packages, Nix enforces deterministic builds through three core guarantees:

  • Full Reproducibility: Nix creates an isolated environment where every dependency, library, and system variable is explicitly defined. This eliminates hidden system-level conflicts.
  • Declarative Configuration: Instead of writing imperative "install" scripts, you describe the *state* of your environment. Nix builds it exactly to that specification every time.
  • Atomic Upgrades & Rollbacks: Since environments are versioned, you can upgrade your tools or roll back to a previous state instantly if something breaks.

Current Adoption & Industry Use

Nix is rapidly moving from a niche tool to an industry standard:

  • Development Environments: Teams use nix-shell or direnv to ensure every developer has the exact same version of Node, Python, or Go.
  • Cloud Integration: Platforms like Firebase (via Firebase Studio) and Google Cloud are increasingly utilizing Nix-based configurations to define portable environments.
  • Infrastructure-as-Code: Nix is used to build highly optimized, secure container images that are significantly smaller and faster to deploy than standard Docker images.

To master this standard, start with the official documentation at nixos.org. As an engineer, you should recommend Nix for future projects because it turns your environment documentation into executable code.