HTML + CSS Flashcards

(22 cards)

1
Q

What is the DOM?

A

a programming interface with a dynamic tree-like structure generated from the HTMLdocument, which can be manipulated with JavaScript to change the document’s content, style, and structure.

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

what does the class attribute do?

A

Specifies one or more class names for an element. The class
attribute is mostly used to point to a class in a style sheet. However, it can also be used by JavaScript to access and manipulate elements with the specific class name.

can be used for javascript and css.

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

What does the ID attribute do?

A

Specifies a unique id for an element. The id attribute is used to point to a style in a style sheet, and by JavaScript (via the DOM) to manipulate the element with the specific id.

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

What does the style attribute do?

A

Specifies inline CSS style for an element.

only one specifically css

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

What does ‘window.onload‘ do?

A

used to run a block of code when the page
has finished loading.

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

What does document.querySelector() do?

A

used to select the first element
with the specified class.

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

What does addEventListener() do?

A

used to attach a click event to the
selected elements.

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

In CSS what does bg-blue-900 do?

A

changes the background colour to the specific colour of blue (900)

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

In CSS what does hover:scale-110 do?

A

upon hovering, transforms it so its 10% bigger.

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

In CSS what does mt-4 mean?

A

apply marginof 4 px to the top

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

In CSS what does pb-2 mean?

A

apply padding of 2 to the bottom.

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

what is <head> ?

A

contains metadata, title and links

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

?

What is <body>?

A

holds visible content such as headings, paragraphs etc. contains the content that is rendered in the browser.

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

What is <div>?

A

A generic container used for grouping related content.

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

What is <input>?

A

Creates interactive fields.

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

What is <br>

A

Inserts a line break.

17
Q

What is <label>?

A

Provides a caption for an input element

18
Q

What is <thead>?

A

Groups the header content of the table.

19
Q

What is <tbody>?

A

Groups the main body of table data.

20
Q

what is <tr>

A

Represents a table row.

21
Q

what is <th>?

A

Defines header cells in a table row.

22
Q

<td>?

A

Represents a standard data cell in a table.