Web Programming Cheat Sheet 2026

The 30 highest-yield Web Programming facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

70 questions
75 min time limit
75.00% to pass
  1. Which CSS property makes an element invisible but still occupies space in the layout? visibility: hidden
  2. What is the purpose of environment variables in web server deployments? Store configuration values like API keys outside of source code
  3. Which web server configuration technique maps incoming URL patterns to different backend applications or directories? URL rewriting / routing rules
  4. Which keyboard key is the standard for activating a button or link that has keyboard focus? Enter
  5. What does the 'async' keyword do when added to a JavaScript function? Makes the function always return a Promise
  6. Which HTTP header prevents a browser from MIME-sniffing a response away from the declared content type? X-Content-Type-Options
  7. Which HTTP method is typically used to UPDATE an existing resource in a REST API? PUT
  8. What is the role of a reverse proxy in a web server architecture? Sits in front of backend servers and forwards client requests to them
  9. What syntax should be used to create a temporary cookie with the value "blue"? Setcookie("color","blue");
  10. Which technique ensures focus is managed correctly when a modal dialog opens? Move focus to the modal and trap it inside until the dialog closes
  11. What is rate limiting in the context of web APIs? Restricting the number of requests a client can make in a given time period
  12. What does a 500 HTTP status code indicate? Internal Server Error
  13. What does REST stand for in web development? Representational State Transfer
  14. In a PHP application, what is the risk of using `eval()` with user-supplied input? It executes arbitrary PHP code, allowing remote code execution attacks
  15. What is the purpose of a `.htaccess` file placed in a web directory on an Apache server? Provides directory-level configuration overrides without restarting Apache
  16. Which HTTP method is used to retrieve data from a server without modifying it? GET
  17. What is the purpose of the 'localStorage' API in web browsers? Persists key-value data in the browser with no expiration
  18. Which PHP superglobal array contains data submitted via an HTML form using the POST method? $_POST
  19. Which HTML attribute is used to provide a text alternative for an image for screen readers? alt
  20. What occurs when a user chooses a new option from a select list? The change event
  21. What is the purpose of an API key in web development? Authenticates and identifies the application making API requests
  22. Which of the following commands, given a Date object named due date, sets the month to February? Due_date.setMonth(1);
  23. What does the === operator check in JavaScript? Both value and type equality
  24. Which of the following is the correct use of `role="alert"` in an accessible web application? Apply it to a container that displays important, time-sensitive messages to users
  25. In CSS, which value of 'position' removes an element from the normal document flow and positions it relative to the viewport? fixed
  26. Which ARIA role should be applied to a navigation landmark element that doesn't use the native tag? role="navigation"
  27. Which algorithm is recommended for hashing passwords in a modern web application? bcrypt
  28. A web app forwards users to a URL from the query string without validation: `redirect?url=https://evil.com`. What is this? Open Redirect
  29. Which HTML tag is used to create a hyperlink?
  30. What does SSL/TLS termination at a load balancer or reverse proxy mean? The proxy decrypts HTTPS traffic and forwards plain HTTP to backend servers
Was this helpful?