Frontend Development Flashcards

1
Q

What is the difference between HTML and HTML5?

A

HTML5 introduced new elements like <header>, <footer>, <article>, and <section>, as well as support for multimedia (e.g., <audio> and <video>).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the box model in CSS.

A

The box model consists of content, padding, border, and margin. It defines how elements are structured and spaced.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

== checks for value equality (with type coercion), while === checks for both value and type equality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is React, and why is it used?

A

React is a JavaScript library for building user interfaces. It uses a virtual DOM for efficient updates and allows reusable components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of useState in React?

A

useState is a React hook that allows functional components to manage state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between let, const, and var in JavaScript?

A

var is function-scoped and hoisted. let and const are block-scoped. const cannot be reassigned after declaration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Virtual DOM?

A

The Virtual DOM is a lightweight copy of the actual DOM. It improves performance by minimizing direct DOM manipulations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are CSS Flexbox and Grid?

A

Flexbox is for one-dimensional layouts (rows or columns), while Grid is for two-dimensional layouts (rows and columns).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly