Career Scan

Interview practice with an AI panel

Interview questions · Freshers

Front-end developer interview questions for freshers

Entry-level front-end interviews focus on HTML, CSS and JavaScript fundamentals, building something small in front of the interviewer, and the projects in your portfolio.

Below are commonly asked questions for freshers, with what a good answer includes.

Looking for questions for experienced candidates? Front-end developer interview questions

What interviewers assess

HTML and CSS questions

  1. What is the difference between block and inline elements?

    What a good answer covers: Block elements take the full width and start on a new line (div, p); inline elements flow within text (span, a). Mention inline-block.

  2. How do you make a page responsive?

    What a good answer covers: A viewport meta tag, flexible layouts with flexbox or grid, relative units and media queries. Mention designing mobile-first.

  3. How do you centre a div horizontally and vertically?

    What a good answer covers: Flexbox with justify-content and align-items set to center, or grid with place-items: center. Interviewers like seeing that you know the modern way.

  4. What is CSS specificity?

    What a good answer covers: How the browser chooses between conflicting rules: inline styles, IDs, classes, then elements. Explain why heavy use of !important causes problems.

JavaScript basics questions

  1. What is the difference between == and ===?

    What a good answer covers: == converts types before comparing; === compares value and type. Use === by default.

  2. Explain map, filter and reduce with examples.

    What a good answer covers: map transforms each item, filter keeps the items that pass a test, reduce combines items into one value. Show a short example of each.

  3. How do you handle a button click and change text on the page?

    What a good answer covers: Select the element, add an event listener, update textContent. Mention why textContent is safer than innerHTML for user input.

  4. What is a promise, and how do async and await work?

    What a good answer covers: A promise represents a future result; async/await lets you write it like synchronous code. Show fetch with try/catch.

About your projects questions

  1. Walk me through a project in your portfolio.

    What a good answer covers: What it does, the stack, the part you are proudest of, one problem you solved and what you would improve. Have the live link ready.

  2. Why did you use React (or plain JavaScript) for this project?

    What a good answer covers: A sensible reason related to the project's needs. It's fine to say you chose it in order to learn it.

  3. How did you make your project work on mobile?

    What a good answer covers: What you tested, the layout changes you made and any issues you found on small screens.

HR and motivation questions

  1. Tell me about yourself.

    What a good answer covers: Degree, how you got into web development, your best project and why this company.

  2. How do you keep learning new front-end skills?

    What a good answer covers: Concrete habits: building small projects, reading documentation, following a course, contributing to open source.

  3. How do you respond to feedback on your code?

    What a good answer covers: Welcome it, ask questions to understand it, apply it, and give an example from a project or internship.

Common mistakes

How to prepare

Reading questions only goes so far: the real test is answering them aloud, under follow-up questions. Career Scan builds a mock interview from your own resume and the job, then shows exactly which answers need work.

Frequently asked questions

Do I need to know React for a fresher front-end role?

Many job posts ask for it, but strong HTML, CSS and JavaScript come first. Learn React once the basics are solid.

Is a portfolio required?

It isn't always required, but it helps a lot. A few working projects you can explain are worth more than a long list of skills.

Will there be a live coding task?

Often. You may be asked to build a small component or fix a layout. Talk through what you're doing as you go.

Related interview questions