
Web Development Fundamentals
HTML structure, CSS selectors and the box model, JavaScript basics, the DOM, HTTP methods, and how the browser, server, and database fit together.
Cards (24)
- 1Front
What does HTML stand for and what is its primary purpose?
BackHyperText Markup Language. It defines the structure and content of web pages using elements represented by tags.
- 2Front
What is the correct basic structure of an HTML document?
Back<!DOCTYPE html>, <html>, <head> (metadata, title, links), and <body> (visible content) elements, in that nesting order.
- 3Front
What is the difference between an HTML element and an HTML attribute?
BackAn element is a tag pair and its content (e.g., <p>text</p>). An attribute is extra information inside the opening tag (e.g., href='url' in <a>).
- 4Front
What is the difference between block-level and inline HTML elements?
BackBlock-level elements (e.g., <div>, <p>) start on a new line and take full width. Inline elements (e.g., <span>, <a>) flow within text and take only as much width as needed.
- 5Front
What are semantic HTML elements and why do they matter?
BackSemantic elements like <header>, <nav>, <main>, <article>, and <footer> describe meaning, improving accessibility and SEO compared to generic <div> tags.
- 6Front
What is CSS specificity and how is it calculated?
BackSpecificity determines which CSS rule applies when multiple rules target the same element. It is calculated as (inline styles, IDs, classes/attributes/pseudo-classes, elements/pseudo-elements), with higher values winning.
- 7Front
What is the difference between a CSS class selector and an ID selector?
BackA class selector (.name) can be applied to multiple elements. An ID selector (#name) must be unique per page. IDs have higher specificity than classes.
- 8Front
What are CSS combinators? Name the four types.
BackCombinators define relationships between selectors: descendant (space), child (>), adjacent sibling (+), and general sibling (~).
- 9Front
What are the four components of the CSS box model, from innermost to outermost?
BackContent, padding, border, and margin.
- 10Front
What is the effect of setting box-sizing: border-box in CSS?
BackIt makes the element's specified width and height include padding and border, so adding padding or border does not increase the element's total size.
- 11Front
What is the difference between CSS margin and padding?
BackPadding is the space between the content and the element's border (inside the box). Margin is the space outside the border, separating the element from others.
- 12Front
What are the three ways to include CSS in an HTML document?
BackInline styles (style attribute on elements), internal styles (<style> tag in <head>), and external stylesheets (linked with <link rel='stylesheet'>).
- 13Front
What is the difference between var, let, and const in JavaScript?
Backvar is function-scoped and hoisted. let is block-scoped and not hoisted to usable state. const is block-scoped, not hoisted to usable state, and cannot be reassigned.
- 14Front
What is the difference between == and === in JavaScript?
Back== checks for value equality with type coercion. === checks for both value and type equality without coercion (strict equality).
- 15Front
What is a JavaScript callback function?
BackA function passed as an argument to another function, to be executed after a certain event or operation completes.
- 16Front
What is the difference between null and undefined in JavaScript?
Backundefined means a variable has been declared but not assigned a value. null is an explicit assignment indicating 'no value' or an intentional absence of an object.
- 17Front
What is the DOM in web development?
BackThe Document Object Model is a tree-structured, in-memory representation of an HTML document that browsers create, allowing JavaScript to read and modify page content, structure, and styles.
- 18Front
What does document.querySelector() do and how does it differ from document.querySelectorAll()?
BackquerySelector() returns the first element matching a CSS selector. querySelectorAll() returns a NodeList of all matching elements.
- 19Front
What is event bubbling in the DOM?
BackWhen an event fires on a child element, it propagates upward through ancestor elements, triggering any matching event listeners on each ancestor in order.
- 20Front
What are the four main HTTP methods and their intended uses?
BackGET (retrieve data), POST (submit/create data), PUT (replace/update data), DELETE (remove data).
- 21Front
What is the difference between an HTTP 4xx and a 5xx status code?
Back4xx codes indicate client-side errors (e.g., 404 Not Found, 401 Unauthorized). 5xx codes indicate server-side errors (e.g., 500 Internal Server Error).
- 22Front
What is the role of a web server in the browser-server-database architecture?
BackThe web server receives HTTP requests from the browser, processes or routes them (often running application logic), communicates with the database if needed, and returns an HTTP response.
- 23Front
What is the role of a database in a web application?
BackThe database persistently stores and manages application data. The server queries or updates it in response to client requests and returns the relevant data to form a response.
- 24Front
What happens step-by-step when a user types a URL and presses Enter in a browser?
BackThe browser performs a DNS lookup to resolve the domain to an IP address, opens a TCP connection to the server, sends an HTTP GET request, the server processes it and returns an HTTP response, and the browser parses HTML/CSS/JS to render the page.
Study this deck free
Create a free account to flip through these flashcards, quiz yourself, play match, and track what you've mastered — or fork the deck to make it your own.