Intro to Front-End Development Flashcards

1
Q

What are the required tags in a basic HTML document?

A

<!DOCTYPE html>, <html>, <head>, <title>, <body></title>

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

Which tags are used for headings?

A

<h1> to <h6>
</h6></h1>

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

How do you create a hyperlink?

A

<a>Link Text</a>

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

How do you add an image?

A

<img></img>

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

What is the purpose of the <form> element?

A

To create user input forms with fields like <input></input>, <textarea>, <button>, etc.</button></textarea>

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

What are the three ways to include CSS in a webpage?

A

Inline styles, internal styles, and external styles.

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

How do class and ID selectors differ?

A

.class targets all elements with that class, while #id targets a unique element.

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

What are the four components of the box model?

A

Margin, border, padding, content.

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

Give an example of a pseudo-class.

A

:hover (styles an element when a user hovers over it).

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

How do you select an element in JavaScript?

A

document.querySelector(selector) or document.getElementById(id).

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

What is an event listener?

A

A function that runs when a user interacts with an element (e.g., click, hover). Example: element.addEventListener(‘click’, function).

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

How do you change the text of an element?

A

element.textContent = ‘New text’;.

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

What tools are essential for front-end debugging?

A

Browser Developer Tools (Inspect Element, Console).

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

How can you make a site responsive?

A

Use flexible grids, media queries, and relative units like % or rem.

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

Why are Flexbox and Grid important?

A

They provide powerful layout systems for aligning and distributing space.

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

Why should you use version control in front-end development?

A

To track changes and collaborate effectively (e.g., with Git).