Member-only story

50 Frontend Developer Interview Questions

Sohit Mishra
7 min readJun 28, 2024

--

HTML and CSS

  1. What is the difference between HTML and HTML5?

Ans: HTML5 is the latest version of HTML, introducing new elements like<article>, <section>, and <nav>, as well as new APIs like Canvas, Web Workers, and local storage.

2. Explain the box model in CSS.

Ans:- The CSS box model comprises margins, borders, padding, and the content itself. It defines how elements are visually structured on a webpage.

3. What is the difference between display: none and visibility: hidden in CSS?

Ans:display: none removes the element from the document flow, while visibility: hidden makes the element invisible but retains its space.

4. What are CSS preprocessors? Give examples.

Ans: CSS preprocessors extend CSS with features like variables, nested rules, and mixins. Examples include Sass, LESS, and Stylus.

5. How do you make a website responsive?

Ans: Techniques include using flexible grid layouts, media queries, responsive images, and CSS frameworks like Bootstrap or Foundation.

6. What is Flexbox and how does it work?

Ans: Flexbox is a CSS layout module that makes it easier to design flexible and…

--

--

Sohit Mishra
Sohit Mishra

Written by Sohit Mishra

Hi, I'm Sohit Mishra, a full-stack developer obsessed with creating seamless digital experiences through front-end and back-end technologies.

Responses (1)