Explain the request-response cycle and give an example with a method and status code.
Show worked solution
A strong answer describes a client sending a request (method + URL + optional data) and a server returning a response (content + status code), with a concrete example like GET /page -> 200, or a form POST, and correctly reads a 404/500.
Write a small snippet of HTML for a page, and describe what CSS would style.
Show worked solution
Good answers use appropriate tags (headings, paragraphs, lists, links) to structure content, and explain that CSS (selectors + properties) would control appearance - colour, spacing, fonts, layout - noting HTML is structure and CSS is style.
Describe how a server turns a request for /users/42 into an HTML response.
Show worked solution
Strong answers trace routing (the URL matched to a handler with id=42), the handler pulling the data, filling a template with it, and returning the HTML - the request -> route -> data -> template -> response backbone.
Explain why you must validate input on the server, and name two classic attacks.
Show worked solution
Good answers explain that front-end checks are bypassable so the server must re-validate untrusted input, and correctly describe injection (never paste input into commands/queries) and XSS (escape user content in HTML output).
Explain what an API is, how it differs from a website, and what REST organises.
Show worked solution
Strong answers say an API returns data (JSON) for programs where a website returns pages (HTML) for people, and describe REST as organising endpoints around resources + HTTP methods (GET read, POST create, DELETE remove).