Junior Web Developer Interview Questions & Answers
40 questions for Junior Web Developer interviews — 25 easy, 15 medium.
About the Junior Web Developer role
A junior web developer builds and updates web pages from designs, fixes layout bugs and adds interactive features with JavaScript. They work under senior guidance on company websites, landing pages and small modules of larger applications. Interviews focus on HTML, CSS, JavaScript basics, responsive design and a portfolio of two or three live projects hosted on GitHub Pages or similar.
Create a dark mode toggle that remembers the user's choice.
Show answer
What is hoisting in JavaScript?
Show answer
What is semantic HTML and why does it matter?
Show answer
Remove duplicates from an array of numbers and from an array of objects.
Show answer
What is AJAX and how is it done today?
Show answer
How is querySelector different from getElementById and getElementsByClassName?
Show answer
Uploaded images overflow their containers and break the layout. What is the fix?
Show answer
What is the difference between innerHTML, textContent and innerText?
Show answer
What is the DOM?
Show answer
What is the difference between preventDefault and stopPropagation?
Show answer
What is ARIA and when should you use it?
Show answer
What does the DOCTYPE declaration do in an HTML page?
Show answer
Why do you want to work as a web developer?
Show answer
What is the difference between == and ===?
Show answer
What is the difference between pseudo-classes and pseudo-elements?
Show answer
What are truthy and falsy values?
Show answer
Tell me about a website you built from scratch.
Show answer
Write an accessible login form with proper labels.
Show answer
Product images look blurry on high-resolution phone screens. How do you fix it?
Show answer
How do you test a website for cross-browser compatibility?
Show answer
Tell me about a database design you are proud of.
Show answer
Explain the CSS box model.
Show answer
What is the difference between var, let and const?
Show answer
How does CSS specificity work?
Show answer
Write CSS for a simple responsive navigation that becomes a column on mobile.
Show answer
Create a responsive card grid that needs no media queries.
Show answer
Write a debounce function and explain where it is used.
Show answer
Your page shows a horizontal scrollbar on mobile. How do you find and fix the cause?
Show answer
Your code throws 'Unexpected token < in JSON' after an API call. What does it mean?
Show answer
Describe a bug you found in production and how you handled it.
Show answer
What is the difference between id and class attributes?
Show answer
Explain the difference between async and defer on a script tag.
Show answer
How do you lazy load images and iframes natively?
Show answer
What is the difference between block-level and inline elements?
Show answer
Explain the values of the CSS position property.
Show answer
Click handlers do not work on buttons added after the page loads. Why?
Show answer
Explain event bubbling and capturing.
Show answer
Why should external links opened with target='_blank' use rel='noopener'?
Show answer
Write the basic SEO meta tags for a course landing page.
Show answer
Frequently asked questions
What does a Junior Web Developer do?
A junior web developer builds and updates web pages from designs, fixes layout bugs and adds interactive features with JavaScript. They work under senior guidance on company websites, landing pages and small modules of larger applications. Interviews focus on HTML, CSS, JavaScript basics, responsive design and a portfolio of two or three live projects hosted on GitHub Pages or similar.
Which skills are tested in a Junior Web Developer interview?
Expect questions on Semantic HTML, Responsive CSS, JavaScript basics, Git and GitHub, Browser DevTools. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Junior Web Developer interview?
Revise HTML Fundamentals, CSS Layout and Responsive Design, JavaScript Core, DOM and Browser Events first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.