HTML DOM Flashcards

1
Q

activeElement

A

Returns the currently focused element in the document

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

addEventListener()

A

Attaches an event handler to the element/document

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

adoptNode

A

Adopts a node from another document

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

baseURI

A

Returns base URI of the document

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

body

A

Sets or returns the documents body ()

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

characterSet

A

Returns the character encoding for a document (ex: UTF-8)

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

close()

A

Closes the output stream previously opened with document.open()

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

cookie

A

Returns all name/value pairs of cookies in the document

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

createAttributes()

A

Creates an attribute and returns the attribute as an Attr object

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

createComment()

A

Creates a comment and returns the comment node, comments are invisible

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

createDocumentFragment()

A

Creates an empty DocumentFragment node

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

createElement()

A

Creates an Element node

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

createEvent()

A

Creates new event

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

createTextNode()

A

Creates a Text node

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

defaultView

A

Returns the window object associated with a document, or null if none is available

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

designMode

A

Controls whether the entire document should be editable or not

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

doctype

A

Returns the Document Type Declaration associated with the document

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

documentElement

A

Returns the root element of the document (HTML)

19
Q

documentURI

A

Sets or returns the location of a document (URN & URL)

20
Q

domain

A

Returns the domain name of the server that loaded the document

21
Q

embeds

A

Returns a collection of all embed elements

22
Q

forms

A

Returns a collection of all form elements

23
Q

getElementByID()

A

Returns the element with the given ID

24
Q

getElementByClassName()

A

Returns HTML elements with the given class name

25
Q

getElementByTagName()

A

Returns HTML elements with the given tag name

26
Q

hasFocus()

A

Returns boolean indicating whether the document has focus

27
Q

head

A

Returns head element

28
Q

images

A

Returns <img></img> element

29
Q

implementation

A

Returns the DOMImplementation object that handles this document

30
Q

importNode()

A

Imports a node from another document

31
Q

lastModified

A

Returns the date and time the document was last modified

32
Q

links

A

Returns a collection of all <a> and elements in the document that have a href attribute</a>

33
Q

normalize()

A

Removes empty Text nodes, and joins adjacent nodes

34
Q

open()

A

Opens an HTML output stream to collect output from document.write()

35
Q

querySelector()

A

Returns the first element that matches a specified CSS selector(s) in the document

36
Q

querySelectorAll()

A

Returns a static NodeList containing all elements that matches a specified CSS selector(s) in the document

37
Q

readyState

A

Returns the (loading) status of the document

38
Q

referrer

A

Returns the URL of the document that loaded the current document

39
Q

removeEventListener()

A

Removes an event handler from the document (that has been attached with the addEventListener() method)

40
Q

scripts

A

Returns a collection of script elements in the document

41
Q

title

A

Sets or returns the title of the document

42
Q

URL

A

Returns the full URL of the HTML document

43
Q

write()

A

Writes HTML expressions or JavaScript code to a document

44
Q

writeIn()

A

Same as write(), but adds a newline character after each statement