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
getElementByTagName()
Returns HTML elements with the given tag name
26
hasFocus()
Returns boolean indicating whether the document has focus
27
head
Returns head element
28
images
Returns element
29
implementation
Returns the DOMImplementation object that handles this document
30
importNode()
Imports a node from another document
31
lastModified
Returns the date and time the document was last modified
32
links
33
normalize()
Removes empty Text nodes, and joins adjacent nodes
34
open()
Opens an HTML output stream to collect output from document.write()
35
querySelector()
Returns the first element that matches a specified CSS selector(s) in the document
36
querySelectorAll()
Returns a static NodeList containing all elements that matches a specified CSS selector(s) in the document
37
readyState
Returns the (loading) status of the document
38
referrer
Returns the URL of the document that loaded the current document
39
removeEventListener()
Removes an event handler from the document (that has been attached with the addEventListener() method)
40
scripts
Returns a collection of script elements in the document
41
title
Sets or returns the title of the document
42
URL
Returns the full URL of the HTML document
43
write()
Writes HTML expressions or JavaScript code to a document
44
writeIn()
Same as write(), but adds a newline character after each statement