Interview questions · Book 02
Web Development interview questions
283 questions from 72 pages, each with a short answer. Say your answer first, then open the question to check it.
p. 1 · 4 questions
AJAX
1
What is AJAX?
AJAX (Asynchronous JavaScript and XML) is a technique for loading server data in the background with JavaScript and updating part of a page without a reload.
2
Is AJAX still used?
The technique is everywhere, though the name is used less. Every page that loads data with
fetchand updates itself without a reload is doing AJAX.3
What is the difference between AJAX and fetch?
AJAX is the general technique. The Fetch API is the modern browser function for making the background request, replacing the older XMLHttpRequest object.
4
Does AJAX have to use XML?
No. XML was common when the name was coined, but almost all AJAX requests today send and receive JSON, and they can carry any format, including plain text and HTML.
p. 2 · 4 questions
Angular
1
What is Angular?
Angular is a complete, TypeScript-based web framework from Google with components, routing, forms, an HTTP client and dependency injection built in.
2
What is the difference between Angular and AngularJS?
AngularJS (2010) was the original JavaScript framework. Angular (2016) is a complete rewrite in TypeScript with a different architecture; AngularJS code doesn't run in Angular, and AngularJS is no longer supported.
3
Is Angular better than React?
Neither is better in general. Angular is a full framework with strong conventions, which suits large teams that want one way of doing things. React is a smaller library that leaves more choices to you and its ecosystem.
4
Does Angular use TypeScript?
Yes. Angular is written in TypeScript, and Angular applications are written in TypeScript too.
p. 3 · 4 questions
ARIA
1
What is ARIA?
ARIA is a W3C standard of HTML attributes, such as role and aria-label, that tell assistive technologies what a custom widget is and what state it is in.
2
What is the first rule of ARIA?
If a native HTML element or attribute already has the meaning and behavior you need, use it instead of adding ARIA. A real
<button>is focusable, works with the keyboard and is announced correctly with no extra code.3
What is the difference between aria-label and aria-labelledby?
aria-labelgives an element its name directly as text.aria-labelledbypoints to theidof another element whose visible text becomes the name, which keeps what is shown and what is spoken in sync.4
What is the difference between ARIA and WCAG?
WCAG is a set of guidelines describing what an accessible page must achieve, such as text alternatives and keyboard access. ARIA is a technical specification of attributes, one of the ways to meet some of those guidelines in custom widgets.
p. 4 · 4 questions
Astro
1
What is Astro?
Astro is a web framework for content-driven sites that renders pages to HTML and ships no JavaScript by default, adding it only to interactive islands.
2
Is Astro a static site generator?
It started as one and still builds static pages by default. With an adapter it can also render pages on the server for each request, so it covers both static and dynamic sites.
3
Can I use React with Astro?
Yes. Astro has official integrations for React, Vue, Svelte, Solid and Preact. Components render to HTML on the server, and only those with a
client:*directive load their JavaScript in the browser.4
What is the difference between Astro and Next.js?
Next.js is a React framework for full web applications and sends React to the browser to run the interface. Astro is aimed at content sites, works with several UI frameworks and sends JavaScript only for the interactive islands.
p. 5 · 4 questions
Babel
1
What is Babel?
Babel is a JavaScript compiler that rewrites modern JavaScript, JSX and TypeScript syntax into code that older browsers and runtimes can run.
2
Is Babel still needed?
Less than before. Modern browsers support almost all current syntax, and faster tools such as SWC, esbuild and Oxc handle TypeScript and JSX in most new projects. Babel is still used where a specific plugin is needed, such as the React Compiler, and in older build setups.
3
What is the difference between Babel and the TypeScript compiler?
Both can turn TypeScript into JavaScript.
tscalso checks types, while Babel only removes them, quickly and one file at a time; many projects let a fast tool compile the code and runtsc --noEmitonly for checking.4
What does @babel/preset-env do?
It looks at the browsers or Node.js versions you target and applies only the transformations they need, so code for modern browsers stays close to what you wrote.
p. 6 · 4 questions
Bootstrap
1
What is Bootstrap?
Bootstrap is a free CSS framework with a responsive grid and ready-made components, such as buttons, navbars and modals, used by adding its classes to HTML.
2
Is Bootstrap still used?
Yes. It is still one of the most widely used CSS frameworks, especially for dashboards, internal tools and quick prototypes, although many new projects choose Tailwind CSS or a component library made for their framework.
3
What is the difference between Bootstrap and Tailwind CSS?
Bootstrap provides ready-made components with a recognizable default design. Tailwind provides low-level utility classes, so you build your own design and components from them.
4
Does Bootstrap need jQuery?
Not since Bootstrap 5. Version 4 and earlier used jQuery for their interactive components; version 5 rewrote them in plain JavaScript and uses the Popper library only to position dropdowns, tooltips and popovers.
p. 7 · 4 questions
Bundler
1
What is a JavaScript bundler?
A bundler is a build tool that combines JavaScript modules and their dependencies into a few optimized files that browsers can download and run quickly.
2
Why do I need a bundler?
A bundler turns many modules and npm packages into a few optimized files, which reduces network requests, removes unused code, and lets you use TypeScript, JSX, and modern syntax. Small sites with only a few scripts can work fine without one.
3
What is the difference between a bundler and a package manager?
A package manager such as npm, pnpm, or Yarn downloads the libraries your project uses and tracks their versions. A bundler then combines your code and those libraries into files that browsers can load.
4
What is tree shaking?
Tree shaking is a bundler optimization that removes exports your code never imports. It works best with ES module
importandexportsyntax, because those can be analyzed without running the code.
p. 8 · 4 questions
CMS
1
What is a CMS?
A CMS (content management system) is software that lets people create, edit and publish website content through an editor instead of writing code.
2
What is a headless CMS?
A CMS without its own website front end. It stores and manages content and serves it through an API, so developers can show it in any framework, app or device.
3
Is WordPress a CMS?
Yes. WordPress is the most widely used CMS. It began as blogging software and is now used for all kinds of websites, from personal blogs to shops and news sites.
4
Do I need a CMS for my website?
If non-developers need to update content regularly, a CMS saves a lot of time. For a small site that rarely changes and is edited by developers, plain files or Markdown may be simpler.