Section1: Implement and Manipulate Document Structures and Objects Flashcards
(102 cards)
used to differ seperate articles within an HTML doc, such as post, blog entry, new story, etc.
hold a major chunk of site navigation such as top or side.
Contains header info for HTML doc OR or elements.
related to surrounding content but not a part of it, such as a quote from the article.
HTML5 Doctype
<! DOCTYPE html >
getElementsByTagName()
returns all the elements in the document with the matching tag name
getElementById()
searches the document for the element matching the id
getAttribute()
gets the named attribute of the element
setAttribute()
sets the value for the named attribute
attributes
src, controls, width, height, autoplay, loop, preload, poster, audio
video elements
src, type (mime type), codecs
inner HTML
will display if the browser does not support the video element
onError
will run if video element is not supported
javascript
play(), pause()
attributes
src, controls, loop, preload, autoplay
audio elements
src, type(mime type)
inner HTML
will display if the browser does not support the audio element
a drawing surface for dynamically creating images, drawings or animation.
document.getElementById(?mycanvas?).getContext(“2d”)
Get canvas context
fillStyle
canvas property sets the fill color on gradiant used during fills
moveTo(x,y)
canvas method moves the drawing cursor to x,y coordinate
lineTo(x,y)
canvas method draws a line from the current drawing cursor to the x,y coordinate specified
arc(x,y,r,start,stop)
canvas method draws an arc centered on the x,y position, with radius r, beginning at the angle given by start and ending at the angle given by stop
stroke()
draws line created by prev drawing command