Chapter 1. Manipulate the DOM Flashcards

1
Q

section tag

A

defines sections in a document, such as chapters, headers, footers, or any other sections of the document.

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

nav tag

A

defines a set of navigation links.

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

aside

A

tag defines some content aside from the content it is placed in.

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

progress - format

A

progress value=”22” max=”100”

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

nav tag

A

defines a set of navigation links.

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

mark

A

tag if you want to highlight parts of your text.

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

figure

A

tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.

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

figcaption

A

tag defines a caption for a figure element.It can be placed as the first or last child of the figure element.

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

hgroup

A

represents a multi-level heading for a section of a document. It groups a set of h tags

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

main

A

represents the dominant content of the body of a document.

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

getElementsByClassName

A

Get all elements that have the class

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

querySelector

A

gets the first child element that matches the provided CSS selector criteria

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

querySelectorAll

A

Gets all the child elements that match the provided CSS selector criteria

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

getElementsByTagName

A

It doesn’t really provide anything useful other than a length, which lets you know how many items it contains, and the ability to access each individual item.

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

appendChild

A

add a new HTML element to the calling container. The node is added to the end of the list of children

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

video- format

A

video controls height=”400” width=”600” poster=”picture.jpg”>
source src=”movie.mp4” type=”video/mp4”
source src=”movie.ogg” type=”video/ogg”

   <p>Video is not supported by this browser.</p>
17
Q

audio element

A

It has all the same attributes and the same methods as video but it occupies no space. It shows only when you use controls option

18
Q

visibility of canvas

A

just like the div, it has no default visibility

19
Q

canvas - coordinates

A

Top left corner (x,y) is (0,0)

20
Q

SVG Performance issues

A

If there is too many objects in an SVG rendering performance can be slow, so in that case use canvas

21
Q

Draw lines on canvas - format

A
window.onload = function () {
            var drawingSurface = document.getElementById("drawingSurface");
            var ctxt = drawingSurface.getContext("2d");
        }

ctxt. beginPath();
ctxt. moveTo(10, 10);
ctxt. lineTo(225, 350);
ctxt. lineTo(300, 10);
ctxt. lineTo(400, 350);
ctxt. stroke();

22
Q

difference between display: none and visibility:hidden

A

display: none means the tag will not appear on the page at all - there will be no space allocated for it on the page
visibility: hidden - it is hidden but the space for it is allocated on the page