On a website, where does backend (server-side) code run?

On the web server, where it can reach databases before sending pages.

Start playing free

  1. In the visitor's browser
  2. On the web server ✔
  3. Inside the visitor's router

Why: Frontend code (HTML, CSS, JavaScript) runs in your browser and shapes how the page looks and acts. Backend code runs on the server, checks requests, reads databases, and chooses what to send back.

Huh, didn't know that: JavaScript can be used on both the client side and the server side.

The dad joke
The frontend and backend had a fight. Now they only talk through the API.
Like this card?
Play the game

References

Answer: On the web server. Frontend code (HTML, CSS, JavaScript) runs in your browser and shapes how the page looks and acts. Backend code runs on the server, checks requests, reads databases, and chooses what to send back.

  1. MDN: Introduction to the server side developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/First_steps/Introduction
    server-side code is run on a web server
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game