Skip to content

Image, PDF and QR tools that run in your browser. Your files never leave your phone. Explore tools →

Web Development Interview Questions for Freshers

Resume & career100% freePrivate

The short answer

Web interviews test HTML, CSS and JavaScript basics. These 10 questions cover the box model, block versus inline, Flexbox versus Grid, semantic HTML, var versus let and const, and closures. Each has a note on a good answer, and a minute is enough to answer one.

How do you want to use it?

10 questions. Open one to see what a good answer covers.

What is the CSS box model?
Web development

Every element is a box made of content, padding, border and margin. Knowing it explains an element's real size, and box-sizing: border-box makes width include padding and border.

What is the difference between block, inline and inline-block?
Web development

Block elements start on a new line and take the full width. Inline elements flow in the text and ignore width and height. Inline-block flows inline but accepts width and height.

When would you use Flexbox, and when Grid?
Web development

Flexbox arranges items in one direction, a row or a column, and suits menus and cards. Grid lays out rows and columns together and suits whole page layouts.

What is semantic HTML and why does it matter?
Web development

Using elements for their meaning, such as header, nav, main and button. It helps accessibility, search engines and readable code, compared with using div for everything.

What is the difference between var, let and const?
Web development

var is function-scoped and hoisted with an undefined value. let and const are block-scoped, and const cannot be reassigned. Prefer const, and let when the value changes.

What is a closure in JavaScript?
Web development

A function that remembers the variables of the place where it was created, even after that place has finished running. It is used for private data and callbacks.

What is the difference between == and === in JavaScript?
Web development

== converts types before comparing, which gives surprises such as 0 == '0'. === compares value and type with no conversion, so it is the safer choice.

What are promises and async/await?
Web development

A promise stands for a value that will arrive later. async/await is a cleaner way to write code that waits for promises, and errors are handled with try and catch.

What happens when you type a URL into the browser?
Web development

The browser finds the server's address through DNS, opens a connection, sends an HTTP request, receives the HTML, and then loads CSS and scripts and draws the page.

How do you make a page responsive?
Web development

Use flexible layouts such as Flexbox and Grid, relative units, images that scale and media queries for different screen widths, and test on a real phone.

Everything runs in your browser. What you type is not sent anywhere.

How to: Web Development Interview Questions for Freshers

  1. 1Read the question and sketch the idea on paper.
  2. 2Say your answer aloud, with a tiny code example.
  3. 3Open the tip and compare.
  4. 4Practise again in practice mode.

At a glance

Questions
10 web development questions
Includes
Box model, layout, semantic HTML, JavaScript scope
Time to aim for
About 60 seconds each

Frequently asked questions

When do I use Flexbox and when Grid?

Use Flexbox to lay items out in one row or column, and Grid when you need rows and columns together. The bank's tip gives a one-line way to say it.

Should I bring a portfolio?

Yes, for web roles. Keep two or three projects live and be ready to explain one choice you made in each, such as how you structured the layout.

More quick answers