Lesson 1 (MIDTERM) Flashcards

(18 cards)

1
Q

is a property of an HTML element that gets or sets the HTML content inside that element.

A

innerHTML

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

is a property of an HTML element that gets or sets the text content inside that element, without parsing any HTML tags.

A

textContent

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

Changing element content

A

innerHTML
textContent

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

Creating Elements

A

createElement()
appendChild()
insertBefore()

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

This method creates a new element of the type specified. It is used to create any HTML element (like a <div>, <span>, <p>, etc.) that you want to add to the document.</span>

A

createElement()

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

This method adds a node (element) to the end of the list of children of a specified parent node. It is used to insert the newly created element into the DOM.

A

appendChild()

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

This method inserts a node before the reference node as a child of a specified parent node. It is used when you need to insert an element at a specific position within a parent node.

A

insertBefore()

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

This method removes a specified child node from the DOM and returns it. It is used to remove a specific element from its parent.

A

removeChild()

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

This method replaces an existing child node with a new node. It is used to swap one element with another within a parent node.

A

replaceChild()

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

Removing Element

A

removeChild()
replaceChild()

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

are actions or occurrences that happen in the browser, which the browser can detect.

A

Events

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

These can be triggered by user interactions (like clicking a button or pressing a key), by the browser itself (like when a page loads), or by JavaScript (such as triggering an animation)

A

Events

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

is the process of detecting and responding to these events in JavaScript.

A

Event Handling

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

is a signal that something has happened in the browser, such as a user clicking a button, submitting a form, moving the mouse, or the browser loading a page.

A

Event

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

What are the types of events

A

Mouse Events: click, dblclick, mouseover, mouseout, etc.
Form Events: submit, change, focus, blur.
Window Events: load, resize, scroll, unload.

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

allows you to add many events to the same element, without overwriting existing events:

A

addEventListener()

17
Q

are events that occur on the window object, which represents the browser’s window or tab displaying the web page.

A

Window events

18
Q

These events are related to the browser window or document as a whole rather than to specific elements within the page.

A

Window events