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
- Which CSS property makes an element invisible but still occupies space in the layout? → visibility: hidden
- What is the purpose of environment variables in web server deployments? → Store configuration values like API keys outside of source code
- Which web server configuration technique maps incoming URL patterns to different backend applications or directories? → URL rewriting / routing rules
- Which keyboard key is the standard for activating a button or link that has keyboard focus? → Enter
- What does the 'async' keyword do when added to a JavaScript function? → Makes the function always return a Promise
- Which HTTP header prevents a browser from MIME-sniffing a response away from the declared content type? → X-Content-Type-Options
- Which HTTP method is typically used to UPDATE an existing resource in a REST API? → PUT
- 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
- What syntax should be used to create a temporary cookie with the value "blue"? → Setcookie("color","blue");
- 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
- What is rate limiting in the context of web APIs? → Restricting the number of requests a client can make in a given time period
- What does a 500 HTTP status code indicate? → Internal Server Error
- What does REST stand for in web development? → Representational State Transfer
- 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
- 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
- Which HTTP method is used to retrieve data from a server without modifying it? → GET
- What is the purpose of the 'localStorage' API in web browsers? → Persists key-value data in the browser with no expiration
- Which PHP superglobal array contains data submitted via an HTML form using the POST method? → $_POST
- Which HTML attribute is used to provide a text alternative for an image for screen readers? → alt
- What occurs when a user chooses a new option from a select list? → The change event
- What is the purpose of an API key in web development? → Authenticates and identifies the application making API requests
- Which of the following commands, given a Date object named due date, sets the month to February? → Due_date.setMonth(1);
- What does the === operator check in JavaScript? → Both value and type equality
- 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
- In CSS, which value of 'position' removes an element from the normal document flow and positions it relative to the viewport? → fixed
- Which ARIA role should be applied to a navigation landmark element that doesn't use the native tag? → role="navigation"
- Which algorithm is recommended for hashing passwords in a modern web application? → bcrypt
- A web app forwards users to a URL from the query string without validation: `redirect?url=https://evil.com`. What is this? → Open Redirect
- Which HTML tag is used to create a hyperlink? →
- 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
Turn these facts into recall:
Was this helpful?