Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING BASH RUST

Brtest Tutorial


Frontend vs Backend

When you visit a website, there are two main parts working together:

  • Frontend – What you see and interact with in your browser.
  • Backend – What happens behind the scenes on the server.

Understanding the difference between the frontend and backend helps you see how web developers work together to create complete websites.

Tip: You don’t need to learn backend right away — start with frontend development (HTML, CSS, and JavaScript). That’s what this tutorial focuses on first.


The Frontend (Client Side)

The frontend is everything that happens in the web browser. It’s the part users can see and interact with: text, images, buttons, forms, menus, and animations.

Frontend developers use:

  • HTML to create the page structure
  • CSS to style and design the layout
  • JavaScript to add interactivity

Example

Here is a simple frontend login form (no backend yet):

<h2>Login Form</h2>
<form>
  <label>Username:</label>
  <input type="text"><br><br>
  <label>Password:</label>
  <input type="password"><br><br>
  <button>Login</button>
</form>
Try it Yourself »

Note: This example only shows the frontend. The button doesn’t actually log you in because there’s no backend logic yet.


The Backend (Server Side)

The backend is where the website’s data and logic live. It runs on a web server and handles tasks like:

  • Storing and retrieving data (like usernames, passwords, posts, or products)
  • Handling user authentication and permissions
  • Processing forms and sending responses back to the frontend

Backend developers use server-side languages like:

  • Python (with frameworks like Django or Flask)
  • PHP (used in WordPress)
  • Node.js (JavaScript on the server)
  • Java or C# (for large-scale applications)

Example

This diagram shows how frontend and backend communicate:

Browser (Frontend) → sends a form request → Server (Backend)
Server → checks the data → sends a response (HTML or JSON)
Browser → updates the page with the result

How They Work Together

When you log in to a website or post a comment:

  1. The frontend displays the form and collects user input.
  2. The backend checks the input and saves it to a database.
  3. The frontend then shows a success message or error based on the backend response.

Example

A very simplified frontend + backend flow:

Frontend → "Submit login info"
Backend → "Checking credentials..."
Backend → "Login successful!"
Frontend → Displays "Welcome back!"

Analogy: The frontend is the restaurant menu. The backend is the kitchen that prepares your food.


Full-Stack Development

A Full-Stack Developer understands both frontend and backend development — how to design what users see and how to make it work behind the scenes.

In this tutorial, you’ll first become comfortable with the frontend:

  • HTML (Structure)
  • CSS (Style)
  • JavaScript (Behavior)

Later, you can explore backend technologies (like databases, servers, and APIs) to become a full-stack web developer.


Summary

  • Frontend: Everything you see and interact with (HTML, CSS, JS)
  • Backend: The behind-the-scenes code that stores and manages data
  • Both parts work together to create a complete website

Next, you will learn what tools you need to start coding — your web browser, code editor, and how to set up your first project folder.

Next » Tools You Need

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.