The Anchor object represents an HTML <a> element.
You can access an <a> element by using getElementById():
You can create an <a> element by using the document.createElement() method:
Property | Description |
---|---|
charset | Not supported in HTML5. Sets or returns the value of the charset attribute of a link |
download | Sets or returns the value of the download attribute of a link |
hash | Sets or returns the anchor part of the href attribute value |
host | Sets or returns the hostname and port part of the href attribute value |
hostname | Sets or returns the hostname part of the href attribute value |
href | Sets or returns the value of the href attribute of a link |
hreflang | Sets or returns the value of the hreflang attribute of a link |
origin | Returns the protocol, hostname and port part of the href attribute value |
name | Not supported in HTML5. Use element.id instead. Sets or returns the value of the name attribute of a link |
password | Sets or returns the password part of the href attribute value |
pathname | Sets or returns the pathname part of the href attribute value |
port | Sets or returns the port part of the href attribute value |
protocol | Sets or returns the protocol part of the href attribute value |
rel | Sets or returns the value of the rel attribute of a link |
rev | Not supported in HTML5. Sets or returns the value of the rev attribute of a link |
search | Sets or returns the querystring part of the href attribute value |
target | Sets or returns the value of the target attribute of a link |
text | Sets or returns the text content of a link |
type | Sets or returns the value of the type attribute of a link |
username | Sets or returns the username part of the href attribute value |
The Anchor object also supports the standard properties and events.
HTML tutorial: HTML links
HTML reference: HTML <a> tag
The Abbreviation object represents an HTML <abbr> element.
You can access an <abbr> element by using getElementById():
You can create an <abbr> element by using the document.createElement() method:
The Abbreviation object supports the standard properties and events.
HTML reference: HTML <abbr> tag
The Address object represents an HTML <address> element.
You can access an <address> element by using getElementById():
You can create an <address> element by using the document.createElement() method:
The Address object supports the standard properties and events.
HTML reference: HTML <address> tag
The Area object represents an HTML <area> element.
You can access an <area> element by using getElementById():
You can create an <area> element by using the document.createElement() method:
Property | Description |
---|---|
alt | Sets or returns the value of the alt attribute of an area |
coords | Sets or returns the value of the coords attribute of an area |
hash | Sets or returns the anchor part of the href attribute value |
host | Sets or returns the hostname and port part of the href attribute value |
hostname | Sets or returns the hostname part of the href attribute value |
href | Sets or returns the value of the href attribute of an area |
noHref | Not supported in HTML5. Sets or returns the value of the nohref attribute of an area |
origin | Returns the protocol, hostname and port part of the href attribute value |
password | Sets or returns the password part of the href attribute value |
pathname | Sets or returns the pathname part of the href attribute value |
port | Sets or returns the port part of the href attribute value |
protocol | Sets or returns the protocol part of the href attribute value |
search | Sets or returns the querystring part of the href attribute value |
shape | Sets or returns the value of the shape attribute of an area |
target | Sets or returns the value of the target attribute of an area |
username | Sets or returns the username part of the href attribute value |
The Area object also supports the standard properties and events.
HTML reference: HTML <area> tag
The Article object represents an HTML <article> element.
Note: The <article> element is not supported in Internet Explorer 8 and earlier versions.
You can access an <article> element by using getElementById():
You can create an <article> element by using the document.createElement() method:
The Article object supports the standard properties and events.
HTML reference: HTML <article> tag
The Aside Object is new in HTML5.
The Aside object represents an HTML <aside> element.
Note: The <aside> element is not supported in Internet Explorer 8 and earlier versions.
You can access an <aside> element by using getElementById():
You can create an <aside> element by using the document.createElement() method:
The Aside object supports the standard properties and events.
HTML reference: HTML <aside> tag
The Audio Object is new in HTML5.
The Audio object represents an HTML <audio> element.
Note: The <audio> element is not supported in Internet Explorer 8 and earlier versions.
You can access an <audio> element by using getElementById():
You can create an <audio> element by using the document.createElement() method:
Property | Description |
---|---|
audioTracks | Returns an AudioTrackList object representing available audio tracks |
autoplay | Sets or returns whether the audio should start playing as soon as it is ready |
buffered | Returns a TimeRanges object representing the buffered parts of an audio |
controller | Returns the MediaController object representing the current media controller of an audio |
controls | Sets or returns whether an audio should have controls displayed (play/pause etc) |
crossOrigin | Sets or returns the CORS settings of an audio |
currentSrc | Returns the URL of the current audio |
currentTime | Sets or returns the current playback position in an audio (in seconds) |
defaultMuted | Sets or returns whether the audio should be muted by default |
defaultPlaybackRate | Sets or returns whether the default playback speed of the audio |
duration | Returns the length of an audio(in seconds) |
ended | Returns whether the playback of the audio has ended |
error | Returns a MediaError object representing the error state of the audio |
loop | Sets or returns whether the audio should start playing over again, every time it is finished |
mediaGroup | Sets or returns the name of the media group the audio(s) is a part of |
muted | Sets or returns whether the sound should be turned off |
networkState | Returns the current network state of an audio |
paused | Sets or returns whether an audio is paused |
playbackRate | Sets or returns the speed of the audio playback |
played | Returns a TimeRanges object representing the played parts of the audio |
preload | Sets or returns the value of the preload attribute of an audio |
readyState | Returns the current ready state of an audio |
seekable | Returns a TimeRanges object representing the seekable parts of an audio |
seeking | Returns whether the user is currently seeking in the audio |
src | Sets or returns the value of the src attribute of an audio |
textTracks | Returns a TextTrackList object representing the available text tracks |
volume | Sets or returns the audio volume of an audio |
Method | Description |
---|---|
addTextTrack() | Adds a new text track to the audio |
canPlayType() | Checks whether the browser can play the specified audio type |
fastSeek() | Seeks to a specified time in the audio player |
getStartDate() | Returns a new Date object, representing the current timeline offset |
load() | Re-loads the audio element |
play() | Starts playing the audio |
pause() | Pauses the currently playing audio |
The Audio object also supports the standard properties and events.
HTML tutorial: HTML5 audio
HTML reference: HTML <audio> tag
The Bold object represents an HTML <b> element.
You can access a <b> element by using getElementById():
You can create a <b> element by using the document.createElement() method:
The Bold object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <b> tag
JavaScript reference: HTML DOM Strong Object
The Base object represents an HTML <base> element.
You can access a <base> element by using getElementById():
You can create a <base> element by using the document.createElement() method:
Property | Description |
---|---|
href | Sets or returns the value of the href attribute in a base element |
target | Sets or returns the value of the target attribute in a base element |
The Base object also supports the standard properties and events.
HTML reference: HTML <base> tag
The Bdo object represents an HTML <bdo> element.
You can access a <bdo> element by using getElementById():
You can create a <bdo> element by using the document.createElement() method:
Property | Description |
---|---|
dir | Sets or returns the value of the dir attribute of a <bdo> element |
The Bdo object supports the standard properties and events.
HTML reference: HTML <bdo> tag
The Blockquote object represents an HTML <blockquote> element.
You can access a <blockquote> element by using getElementById():
You can create a <blockquote> element by using the document.createElement() method:
Property | Description |
---|---|
cite | Sets or returns the value of the cite attribute of a quotation |
The Blockquote object also supports the standard properties and events.
HTML reference: HTML <blockquote> tag
JavaScript reference: HTML DOM Quote Object
The Body object represents an HTML <body> element.
You can access a <body> element by using getElementsByTagName():
Tip: You can also access a <body> element by using the document.body property.
You can create a <body> element by using the document.createElement() method:
var x = document.createElement("BODY");
Property | Description |
---|---|
aLink | Not supported in HTML5. See CSS :active Selector instead.
Sets or returns the color of an active link in a document |
background | Not supported in HTML5. Use style.backgroundImage instead. Sets or returns the background image for a document |
bgColor | Not supported in HTML5. Use style.backgroundColor instead. Sets or returns the background color of a document |
link | Not supported in HTML5. See CSS :link Selector instead. Sets or returns the color of unvisited links in a document |
text | Not supported in HTML5. Use style.color instead. Sets or returns the color of the text in a document |
vLink | Not supported in HTML5. See CSS :visited Selector instead.
Sets or returns the color of visited links in a document |
The Body object also supports the standard properties and events.
HTML reference: HTML <body> tag
The BR object represents an HTML <br> element.
You can access a <br> element by using getElementById():
You can create a <br> element by using the document.createElement() method:
Property | Description |
---|---|
clear | Not supported in HTML5. Use style.clear instead. Sets or returns the flow of text around floating objects |
The BR object also supports the standard properties and events.
HTML reference: HTML <br> tag
The Button object represents an HTML <button> element.
You can access a <button> element by using getElementById():
You can create a <button> element by using the document.createElement() method:
Property | Description |
---|---|
autofocus | Sets or returns whether a button should automatically get focus when the page loads, or not |
disabled | Sets or returns whether a button is disabled, or not |
form | Returns a reference to the form that contains a button |
formAction | Sets or returns the value of the formaction attribute of a button |
formEnctype | Sets or returns the value of the formenctype attribute of a button |
formMethod | Sets or returns the value of the formmethod attribute of a button |
formNoValidate | Sets or returns whether the form-data should be validated or not, on submission |
formTarget | Sets or returns the value of the formtarget attribute of a button |
name | Sets or returns the value of the name attribute of a button |
type | Sets or returns the type of a button |
value | Sets or returns the value of the value attribute of a button |
The Button object also supports the standard properties and events.
HTML reference: HTML <button> tag
The Canvas Object is new in HTML5.
The HTML5 <canvas> tag is used to draw graphics, on the fly, with JavaScript.
You can access a <canvas> element by using getElementById():
You can create a <canvas> element by using the document.createElement() method:
Note: The <canvas> element has no drawing abilities of its own (it is only a container for graphics) - you must use a script to actually draw the graphics.
The getContext() method returns an object that provides methods and properties for drawing on the canvas.
This reference will cover the properties and methods of the getContext("2d") object, which can be used to draw text, lines, boxes, circles, and more - on the canvas.
Property | Description |
---|---|
fillStyle | Sets or returns the color, gradient, or pattern used to fill the drawing |
strokeStyle | Sets or returns the color, gradient, or pattern used for strokes |
shadowColor | Sets or returns the color to use for shadows |
shadowBlur | Sets or returns the blur level for shadows |
shadowOffsetX | Sets or returns the horizontal distance of the shadow from the shape |
shadowOffsetY | Sets or returns the vertical distance of the shadow from the shape |
Method | Description |
---|---|
createLinearGradient() | Creates a linear gradient (to use on canvas content) |
createPattern() | Repeats a specified element in the specified direction |
createRadialGradient() | Creates a radial/circular gradient (to use on canvas content) |
addColorStop() | Specifies the colors and stop positions in a gradient object |
Property | Description |
---|---|
lineCap | Sets or returns the style of the end caps for a line |
lineJoin | Sets or returns the type of corner created, when two lines meet |
lineWidth | Sets or returns the current line width |
miterLimit | Sets or returns the maximum miter length |
Method | Description |
---|---|
rect() | Creates a rectangle |
fillRect() | Draws a "filled" rectangle |
strokeRect() | Draws a rectangle (no fill) |
clearRect() | Clears the specified pixels within a given rectangle |
Method | Description |
---|---|
fill() | Fills the current drawing (path) |
stroke() | Actually draws the path you have defined |
beginPath() | Begins a path, or resets the current path |
moveTo() | Moves the path to the specified point in the canvas, without creating a line |
closePath() | Creates a path from the current point back to the starting point |
lineTo() | Adds a new point and creates a line from that point to the last specified point in the canvas |
clip() | Clips a region of any shape and size from the original canvas |
quadraticCurveTo() | Creates a quadratic Bézier curve |
bezierCurveTo() | Creates a cubic Bézier curve |
arc() | Creates an arc/curve (used to create circles, or parts of circles) |
arcTo() | Creates an arc/curve between two tangents |
isPointInPath() | Returns true if the specified point is in the current path, otherwise false |
Method | Description |
---|---|
scale() | Scales the current drawing bigger or smaller |
rotate() | Rotates the current drawing |
translate() | Remaps the (0,0) position on the canvas |
transform() | Replaces the current transformation matrix for the drawing |
setTransform() | Resets the current transform to the identity matrix. Then runs transform() |
Property | Description |
---|---|
font | Sets or returns the current font properties for text content |
textAlign | Sets or returns the current alignment for text content |
textBaseline | Sets or returns the current text baseline used when drawing text |
Method | Description |
---|---|
fillText() | Draws "filled" text on the canvas |
strokeText() | Draws text on the canvas (no fill) |
measureText() | Returns an object that contains the width of the specified text |
Method | Description |
---|---|
drawImage() | Draws an image, canvas, or video onto the canvas |
Property | Description |
---|---|
width | Returns the width of an ImageData object |
height | Returns the height of an ImageData object |
data | Returns an object that contains image data of a specified ImageData object |
Method | Description |
---|---|
createImageData() | Creates a new, blank ImageData object |
getImageData() | Returns an ImageData object that copies the pixel data for the specified rectangle on a canvas |
putImageData() | Puts the image data (from a specified ImageData object) back onto the canvas |
Property | Description |
---|---|
globalAlpha | Sets or returns the current alpha or transparency value of the drawing |
globalCompositeOperation | Sets or returns how a new image are drawn onto an existing image |
Method | Description |
---|---|
save() | Saves the state of the current context |
restore() | Returns previously saved path state and attributes |
createEvent() | |
getContext() | |
toDataURL() |
The canvas object also supports the standard properties and events.
HTML tutorial: HTML5 Canvas
HTML reference: HTML <canvas> tag
The Caption object represents an HTML <caption> element.
You can access a <caption> element by using getElementById():
You can create a <caption> element by using the document.createElement() method:
Tip: You can also create a <caption> element by using the createCaption method of the Table object.
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign or
style.captionSide instead. Sets or returns the alignment of the caption |
The Caption object also supports the standard properties and events.
HTML tutorial: HTML Tables
HTML reference: HTML <caption> tag
JavaScript reference: HTML DOM Table Object
The Cite object represents an HTML <cite> element.
You can access a <cite> element by using getElementById():
You can create a <cite> element by using the document.createElement() method:
The Cite object also supports the standard properties and events.
HTML reference: HTML <cite> tag
The Code object represents an HTML <code> element.
You can access a <code> element by using getElementById():
You can create a <code> element by using the document.createElement() method:
The Code object also supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <code> tag
The Column object represents an HTML <col> element.
You can access a <col> element by using getElementById():
You can create a <col> element by using the document.createElement() method:
var x = document.createElement("COL");
Property | Description |
---|---|
span | Sets or returns the value of the span attribute of a column |
The Column object also supports the standard properties and events.
HTML tutorial: HTML tables
HTML reference: HTML <col> tag
JavaScript reference: HTML DOM Columngroup Object
The ColumnGroup object represents an HTML <colgroup> element.
You can access a <colgroup> element by using getElementById():
var x = document.createElement("COLGROUP");
Property | Description |
---|---|
span | Sets or returns the value of the span attribute of a column group |
The ColumnGroup object also supports the standard properties and events.
HTML tutorial: HTML tables
HTML reference: HTML <colgroup> tag
JavaScript reference: HTML DOM Column Object
The Datalist Object is new in HTML5.
The Datalist object represents an HTML <datalist> element.
Note: The <datalist> element is not supported in Internet Explorer 9 (and earlier versions), or Safari.
You can access a <datalist> element by using getElementById():
You can create a <datalist> element by using the document.createElement() method:
Collection | Description |
---|---|
options | Returns a collection of all the options in a datalist |
The Datalist object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <datalist> tag
The DD object represents an HTML <dd> element.
You can access a <dd> element by using getElementById():
You can create a <dd> element by using the document.createElement() method:
The DD object also supports the standard properties and events.
HTML reference: HTML <dd> tag
The Del object represents an HTML <del> element.
You can access a <del> element by using getElementById():
You can create a <del> element by using the document.createElement() method:
Property | Description |
---|---|
cite | Sets or returns the value of the cite attribute of a deleted text |
dateTime | Sets or returns the value of the datetime attribute of a deleted text |
The Del object also supports the standard properties and events.
HTML tutorial: HTML Text Formatting
HTML reference: HTML <del> tag
JavaScript reference: HTML DOM ins Object
The Details object represents an HTML <details> element.
Note: The <details> element is not supported in Internet Explorer.
You can access a <details> element by using getElementById():
You can create a <details> element by using the document.createElement() method:
Property | Description |
---|---|
open | Sets or returns whether the details should be visible (open) to the user, or not |
The Details object also supports the standard properties and events.
HTML reference: HTML <details> tag
HTML reference: HTML <summary> tag
JavaScript reference: HTML DOM Details Object
The DFN object represents an HTML <dfn> element.
You can access a <dfn> element by using getElementById():
You can create a <dfn> element by using the document.createElement() method:
The DFN object also supports the standard properties and events.
HTML reference: HTML <dfn> tag
The Dialog Object is new in HTML5.
The Dialog object represents an HTML <dialog> element.
Note: The <dialog> element is currently only supported in Chrome 37+, Safari 6+ and Opera 24+.
You can access a <dialog> element by using getElementById():
You can create a <dialog> element by using the document.createElement() method:
Property | Description |
---|---|
open | Sets or returns whether a dialog should be open or not |
returnValue | Sets or returns the dialog's return value |
Method | Description |
---|---|
close() | Closes the dialog |
show() | Shows the dialog |
showModal() | Shows the dialog and makes it the top-most modal dialog |
The Dialog object also supports the standard properties and events.
HTML reference: HTML <dialog> tag
The Div object represents an HTML <div> element.
You can access a <div> element by using getElementById():
You can create a <div> element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign instead. Sets or returns the value of the align attribute of the <div> element |
The Div object also supports the standard properties and events.
HTML tutorial: HTML Blocks
HTML reference: HTML <div> tag
The DList object represents an HTML <dl> element.
You can access a <dl> element by using getElementById():
You can create a <dl> element by using the document.createElement() method:
The DList object supports the standard properties and events.
HTML tutorial: HTML Lists
HTML reference: HTML <dl> tag
The DT object represents an HTML <dt> element.
You can access a <dt> element by using getElementById():
You can create a <dt> element by using the document.createElement() method:
The DT object also supports the standard properties and events.
HTML reference: HTML <dt> tag
The Emphasized object represents an HTML <em> element.
You can access an <em> element by using getElementById():
You can create an <em> element by using the document.createElement() method:
The Emphasized object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <em> tag
JavaScript reference: HTML DOM Italic Object
The Embed Object is new in HTML5.
The Embed object represents an HTML <embed> element.
You can access an <embed> element by using getElementById():
You can create an <embed> element by using the document.createElement() method:
Property | Description |
---|---|
height | Sets or returns the value of the height attribute in an embed element |
src | Sets or returns the value of the src attribute in an embed element |
type | Sets or returns the value of the type attribute in an embed element |
width | Sets or returns the value of the width attribute in an embed element |
The Embed object also supports the standard properties and events.
HTML tutorial: HTML Plug-ins
HTML reference: HTML <embed> tag
The Fieldset object represents an HTML <fieldset> element.
You can access a <fieldset> element by using getElementById():
Tip: You can also access a Fieldset object by searching through the elements collection of a form.
You can create a <fieldset> element by using the document.createElement() method:
Property | Description |
---|---|
disabled | Sets or returns whether a fieldset is disabled, or not |
form | Returns a reference to the form that contains the fieldset |
name | Sets or returns the value of the name attribute of a fieldset |
type | Returns which type of form element the fieldset is |
The Fieldset object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <fieldset> tag
The Figcaption Object is new in HTML5.
The Figcaption object represents an HTML <figcaption> element.
You can access a <figcaption> element by using getElementById():
You can create a <figcaption> element by using the document.createElement() method:
The Figcaption object also supports the standard properties and events.
HTML reference: HTML <figcaption> tag
The Figure Object is new in HTML5.
The Figure object represents an HTML <figure> element.
You can access a <figure> element by using getElementById():
You can create a <figure> element by using the document.createElement() method:
The Figure object also supports the standard properties and events.
HTML reference: HTML <figure> tag
The Footer Object is new in HTML5.
The Footer object represents an HTML <footer> element.
Note: The <footer> element is not supported in Internet Explorer 8 and earlier versions.
You can access a <footer> element by using getElementById():
You can create a <footer> element by using the document.createElement() method:
The Footer object also supports the standard properties and events.
HTML tutorial: HTML5 Semantic Elements
HTML reference: HTML <footer> tag
JavaScript reference: HTML DOM Header Object
The Form object represents an HTML <form> element.
You can access a <form> element by using getElementById():
Tip: You can also access a <form> element by using the forms collection.
You can create a <form> element by using the document.createElement() method:
Collection | Description |
---|---|
elements | Returns a collection of all elements in a form |
Property | Description |
---|---|
acceptCharset | Sets or returns the value of the accept-charset attribute in a form |
action | Sets or returns the value of the action attribute in a form |
autocomplete | Sets or returns the value of the autocomplete attribute in a form |
encoding | Alias of enctype |
enctype | Sets or returns the value of the enctype attribute in a form |
length | Returns the number of elements in a form |
method | Sets or returns the value of the method attribute in a form |
name | Sets or returns the value of the name attribute in a form |
noValidate | Sets or returns whether the form-data should be validated or not, on submission |
target | Sets or returns the value of the target attribute in a form |
Method | Description |
---|---|
reset() | Resets a form |
submit() | Submits a form |
The Form object also supports the standard properties and events.
HTML tutorial: HTML Forms
JavaScript tutorial: JS Forms/Validation
HTML reference: HTML <form> tag
The Head object represents an HTML <head> element.
You can access a <head> element by using getElementsByTagName():
var x = document.getElementsByTagName("HEAD")[0];
You can create a <head> element by using the document.createElement() method:
var x = document.createElement("HEAD");
The Head object also supports the standard properties and events.
HTML tutorial: HTML Head
HTML reference: HTML <head> tag
The Header Object is new in HTML5.
The Header object represents an HTML <header> element.
Note: The <header> element is not supported in Internet Explorer 8 and earlier versions.
You can access a <header> element by using getElementById():
You can create a <header> element by using the document.createElement() method:
The Header object also supports the standard properties and events.
HTML tutorial: HTML5 Semantic Elements
HTML reference: HTML <header> tag
JavaScript reference: HTML DOM Footer Object
The Heading object represents an HTML heading element: <h1> to <h6>.
You can access a heading element by using getElementById():
You can create a heading element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign instead. Sets or returns the value of the align attribute of the heading element |
The Heading object also supports the standard properties and events.
HTML tutorial: HTML Headings
HTML reference: HTML <h1> to <h6> Tags
The HR object represents an HTML <hr> element.
You can access a <hr> element by using getElementById():
You can create a <hr> element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the alignment of a horizontal line |
color | Not supported in HTML5. Use style.color instead. Sets or returns the color of a horizontal line |
noshade | Not supported in HTML5. Sets or returns whether a horizontal line should render in one solid color (noshaded) |
size | Not supported in HTML5. Use style.height instead. Sets or returns the height of a horizontal line |
width | Not supported in HTML5. Use style.width instead. Sets or returns the width of a horizontal line |
The HR object also supports the standard properties and events.
HTML reference: HTML <hr> tag
The HTML object represents an HTML <html> element.
You can access the <html> element by using getElementsByTagName():
Tip: You can also access the <html> element by using the document.documentElement property.
The HTML object also supports the standard properties and events.
HTML tutorial: HTML Introduction
HTML reference: HTML <html> tag
The Italic object represents an HTML <i> element.
You can access an <i> element by using getElementById():
You can create an <i> element by using the document.createElement() method:
The Italic object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <i> tag
JavaScript reference: HTML DOM Emphasized Object
The IFrame object represents an HTML <iframe> element.
You can access an <iframe> element by using getElementById():
Tip: You can also access an <iframe> element by using the window.frames property.
You can create an <iframe> element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use style.cssFloat instead. Sets or returns the value of the align attribute in an iframe |
contentDocument | Returns the document object generated by an iframe |
contentWindow | Returns the window object generated by an iframe |
frameBorder | Not supported in HTML5. Use
style.border instead. Sets or returns the value of the frameborder attribute in an iframe |
height | Sets or returns the value of the height attribute in an iframe |
longDesc | Not supported in HTML5. Sets or returns the value of the longdesc attribute in an iframe |
marginHeight | Not supported in HTML5. Use style.margin instead. Sets or returns the value of the marginheight attribute in an iframe |
marginWidth | Not supported in HTML5. Use style.margin instead. Sets or returns the value of the marginwidth attribute in an iframe |
name | Sets or returns the value of the name attribute in an iframe |
sandbox | Returns the value of the sandbox attribute in an iframe |
scrolling | Not supported in HTML5. Sets or returns the value of the scrolling attribute in an iframe |
seamless | Sets or returns whether an iframe should look like it is a part of the containing document (no borders or scrollbars), or not |
src | Sets or returns the value of the src attribute in an iframe |
srcdoc | Sets or returns the value of the srcdoc attribute in an iframe |
width | Sets or returns the value of the width attribute in an iframe |
The IFrame object also supports the standard properties and events.
HTML reference: HTML <iframe> tag
The Image object represents an HTML <img> element.
You can access an <img> element by using getElementById():
Tip: You can also access an <img> element by using the images collection.
You can create an <img> element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use style.cssFloat instead. Sets or returns the value of the align attribute of an image |
alt | Sets or returns the value of the alt attribute of an image |
border | Not supported in HTML5. Use style.border instead. Sets or returns the value of the border attribute of an image |
complete | Returns whether or not the browser is finished loading an image |
crossOrigin | Sets or returns the CORS settings of an image |
height | Sets or returns the value of the height attribute of an image |
hspace | Not supported in HTML5. Use
style.margin instead. Sets or returns the value of the hspace attribute of an image |
isMap | Sets or returns whether an image should be part of a server-side image-map, or not |
longDesc | Not supported in HTML5. Sets or returns the value of the longdesc attribute of an image |
lowsrc | Not supported in HTML5. Sets or returns a URL to a low-resolution version of an image |
name | Not supported in HTML5. Use id instead. Sets or returns the value of the name attribute of an image |
naturalHeight | Returns the original height of an image |
naturalWidth | Returns the original width of an image |
src | Sets or returns the value of the src attribute of an image |
useMap | Sets or returns the value of the usemap attribute of an image |
vspace | Not supported in HTML5. Use
style.margin instead. Sets or returns the value of the vspace attribute of an image |
width | Sets or returns the value of the width attribute of an image |
The Image object also supports the standard properties and events.
HTML tutorial: HTML Images
HTML reference: HTML <img> tag
The Ins object represents an HTML <ins> element.
You can access an <ins> element by using getElementById():
You can create an <ins> element by using the document.createElement() method:
Property | Description |
---|---|
cite | Sets or returns the value of the cite attribute of an inserted text |
dateTime | Sets or returns the value of the datetime attribute of an inserted text |
The Ins object also supports the standard properties and events.
HTML tutorial: HTML Text Formatting
HTML reference: HTML <ins> tag
JavaScript reference: HTML DOM del Object
The Input Button object represents an HTML <input> element with type="button".
You can access an <input> element with type="button" by using getElementById():
Tip: You can also access <input type="button"> by searching through the elements collection of a form.
You can create an <input> element with type="button" by using the document.createElement() method:
Property | Description |
---|---|
autofocus | Sets or returns whether an input button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of an input button |
disabled | Sets or returns whether an input button is disabled, or not |
form | Returns a reference to the form that contains the input button |
name | Sets or returns the value of the name attribute of an input button |
type | Returns which type of form element the input button is |
value | Sets or returns the value of the value attribute of an input button |
The Input Button object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Checkbox object represents an HTML <input> element with type="checkbox".
You can access an <input> element with type="checkbox" by using getElementById():
Tip: You can also access <input type="checkbox"> by searching through the elements collection of a form.
You can create an <input> element with type="checkbox" by using the document.createElement() method:
var x = document.createElement("INPUT");
x.setAttribute("type", "checkbox");
Try it Yourself »
Property | Description |
---|---|
autofocus | Sets or returns whether a checkbox should automatically get focus when the page loads |
checked | Sets or returns the checked state of a checkbox |
defaultChecked | Returns the default value of the checked attribute |
defaultValue | Sets or returns the default value of a checkbox |
disabled | Sets or returns whether a checkbox is disabled, or not |
form | Returns a reference to the form that contains the checkbox |
indeterminate | Sets or returns the indeterminate state of the checkbox |
name | Sets or returns the value of the name attribute of a checkbox |
required | Sets or returns whether the checkbox must be checked before submitting a form |
type | Returns which type of form element the checkbox is |
value | Sets or returns the value of the value attribute of a checkbox |
The Input Checkbox object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Color Object is new in HTML5.
The Input Color object represents an HTML <input> element with type="color".
Note: <input> elements with type="color" are not supported in Internet Explorer 11 and earlier versions or Safari 9.1 and earlier versions.
You can access an <input> element with type="color" by using getElementById():
Tip: You can also access <input type="color"> by searching through the elements collection of a form.
You can create an <input> element with type="color" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a color picker |
autofocus | Sets or returns whether a color picker should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a color picker |
disabled | Sets or returns whether a color picker is disabled, or not |
form | Returns a reference to the form that contains the color picker |
list | Returns a reference to the <datalist> element that contains the color picker |
name | Sets or returns the value of the name attribute of a color picker |
type | Returns which type of form element the color picker is |
value | Sets or returns the value of the value attribute of a color picker |
The Input Color object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Date Object is new in HTML5.
The Input Date object represents an HTML <input> element with type="date".
Note: <input> elements with type="date" do not show as any date field/calendar in IE11 and earlier versions.
You can access an <input> element with type="date" by using getElementById():
Tip: You can also access <input type="date"> by searching through the elements collection of a form.
You can create an <input> element with type="date" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a date field |
autofocus | Sets or returns whether a date field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a date field |
disabled | Sets or returns whether a date field is disabled, or not |
form | Returns a reference to the form that contains the date field |
list | Returns a reference to the datalist that contains the date field |
max | Sets or returns the value of the max attribute of the date field |
min | Sets or returns the value of the min attribute of the date field |
name | Sets or returns the value of the name attribute of a date field |
readOnly | Sets or returns whether the date field is read-only, or not |
required | Sets or returns whether the date field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the date field |
type | Returns which type of form element the date field is |
value | Sets or returns the value of the value attribute of a date field |
Method | Description |
---|---|
stepDown() | Decrements the value of the date field by a specified number |
stepUp() | Increments the value of the date field by a specified number |
The Input Date object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Datetime Object is new in HTML5.
The Input Datetime object represents an HTML <input> element with type="datetime".
Note: <input> elements with type="datetime" do not show as any datetime field/calendar in any of the major browsers, except Safari.
You can access an <input> element with type="datetime" by using getElementById():
Tip: You can also access <input type="datetime"> by searching through the elements collection of a form.
You can create an <input> element with type="datetime" by using the document.createElement() method:
var x = document.createElement("INPUT");
x.setAttribute("type", "datetime");
Try it Yourself »
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a datetime field |
autofocus | Sets or returns whether a datetime field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a datetime field |
disabled | Sets or returns whether a datetime field is disabled, or not |
form | Returns a reference to the form that contains the datetime field |
list | Returns a reference to the datalist that contains the datetime field |
max | Sets or returns the value of the max attribute of the datetime field |
min | Sets or returns the value of the min attribute of the datetime field |
name | Sets or returns the value of the name attribute of a datetime field |
readOnly | Sets or returns whether the datetime field is read-only, or not |
required | Sets or returns whether the datetime field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the datetime field |
type | Returns which type of form element the datetime field is |
value | Sets or returns the value of the value attribute of a datetime field |
Method | Description |
---|---|
stepDown() | Decrements the value of the datetime field by a specified number |
stepUp() | Increments the value of the datetime field by a specified number |
The Input Datetime object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input DatetimeLocal Object is new in HTML5.
The Input DatetimeLocal object represents an HTML <input> element with type="datetime-local".
Note: <input> elements with type="datetime-local" do not show as any datetime field/calendar in Firefox or in IE12 and earlier versions.
You can access an <input> element with type="datetime-local" by using getElementById():
Tip: You can also access <input type="datetime-local"> by searching through the elements collection of a form.
You can create an <input> element with type="datetime-local" by using the document.createElement() method:
var x = document.createElement("INPUT");
x.setAttribute("type", "datetime-local");
Try it Yourself »
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a local datetime field |
autofocus | Sets or returns whether a local datetime field should automatically get focus upon page load |
defaultValue | Sets or returns the default value of a local datetime field |
disabled | Sets or returns whether a local datetime field is disabled, or not |
form | Returns a reference to the form that contains the local datetime field |
list | Returns a reference to the datalist that contains the local datetime field |
max | Sets or returns the value of the max attribute of the local datetime field |
min | Sets or returns the value of the min attribute of the local datetime field |
name | Sets or returns the value of the name attribute of a local datetime field |
readOnly | Sets or returns whether the local datetime field is read-only, or not |
required | Sets or returns whether the local datetime field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the local datetime field |
type | Returns which type of form element the local datetime field is |
value | Sets or returns the value of the value attribute of a local datetime field |
Method | Description |
---|---|
stepDown() | Decrements the value of the datetime field by a specified number |
stepUp() | Increments the value of the datetime field by a specified number |
The Input DatetimeLocal object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Email Object is new in HTML5.
The Input Email object represents an HTML <input> element with type="email".
Note: <input> elements with type="email" are not supported in Internet Explorer 9 (and earlier versions), or Safari.
You can access an <input> element with type="email" by using getElementById():
Tip: You can also access <input type="email"> by searching through the elements collection of a form.
You can create an <input> element with type="email" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of an email field |
autofocus | Sets or returns whether an email field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of an email field |
disabled | Sets or returns whether an email field is disabled, or not |
form | Returns a reference to the form that contains the email field |
list | Returns a reference to the datalist that contains the email field |
maxLength | Sets or returns the value of the maxlength attribute of an email field |
multiple | Sets or returns whether a user is allowed to enter more than one email address in the email field |
name | Sets or returns the value of the name attribute of an email field |
pattern | Sets or returns the value of the pattern attribute of an email field |
placeholder | Sets or returns the value of the placeholder attribute of an email field |
readOnly | Sets or returns whether the email field is read-only, or not |
required | Sets or returns whether the email field must be filled out before submitting a form |
size | Sets or returns the value of the size attribute of the email field |
type | Returns which type of form element the email field is |
value | Sets or returns the value of the value attribute of an email field |
The Input Email object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input FileUpload object represents an HTML <input> element with type="file".
You can access an <input> element with type="file" by using getElementById():
Tip: You can also access <input type="file"> by searching through the elements collection of a form.
You can create an <input> element with type="file" by using the document.createElement() method:
Property | Description |
---|---|
accept | Sets or returns the value of the accept attribute of the file upload button |
autofocus | Sets or returns whether a file upload button should automatically get focus upon page load |
defaultValue | Sets or returns the default value of the file upload button |
disabled | Sets or returns whether the file upload button is disabled, or not |
files | Returns a FileList object that represents the file or files selected with the file upload button |
form | Returns a reference to the form that contains the file upload button |
multiple | Sets or returns whether a user is allowed to select more than one file in the file upload field |
name | Sets or returns the value of the name attribute of the file upload button |
required | Sets or returns whether a file in the file upload field must be selected before submitting a form |
type | Returns which type of form element the file upload button is |
value | Returns the path or the name of the selected file |
The Input FileUpload object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Hidden object represents an HTML <input> element with type="hidden".
You can access an <input> element with type="hidden" by using getElementById():
Tip: You can also access <input type="hidden"> by searching through the elements collection of a form.
You can create an <input> element with type="hidden" by using the document.createElement() method:
Property | Description |
---|---|
defaultValue | Sets or returns the default value of the hidden input field |
form | Returns a reference to the form that contains the hidden input field |
name | Sets or returns the value of the name attribute of the hidden input field |
type | Returns which type of form element a hidden input field is |
value | Sets or returns the value of the value attribute of the hidden input field |
The Input Hidden object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Image object represents an HTML <input> element with type="image".
You can access an <input> element with type="image" by using getElementById():
var x = document.getElementById("myImage");
Tip: You can also access <input type="image"> by searching through the elements collection of a form.
You can create an <input> element with type="image" by using the document.createElement() method:
var x = document.createElement("INPUT");
x.setAttribute("type", "image");
Property | Description |
---|---|
alt | Sets or returns the value of the alt attribute of an input image |
autofocus | Sets or returns whether an input image should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of an input image |
disabled | Sets or returns whether an input image is disabled, or not |
form | Returns a reference to the form that contains the input image |
formAction | Sets or returns the value of the formaction attribute of an input image |
formEnctype | Sets or returns the value of the formenctype attribute of an input image |
formMethod | Sets or returns the value of the formmethod attribute of an input image |
formNoValidate | Sets or returns whether the form-data should be validated or not, on submission |
formTarget | Sets or returns the value of the formtarget attribute an input image |
height | Sets or returns the value of the height attribute of the input image |
name | Sets or returns the value of the name attribute of an input image |
src | Sets or returns the value of the src attribute of the input image |
type | Returns which type of form element the input image is |
value | Sets or returns the value of the value attribute of an input image |
width | Sets or returns the value of the width attribute of the input image |
The Input Image object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Month Object is new in HTML5.
The Input Month object represents an HTML <input> element with type="month".
Note: <input> elements with type="month" do not show as any date field/calendar in Firefox, or in IE11 and earlier versions.
You can access an <input> element with type="month" by using getElementById():
Tip: You can also access <input type="month"> by searching through the elements collection of a form.
You can create an <input> element with type="month" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a month field |
autofocus | Sets or returns whether a month field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a month field |
disabled | Sets or returns whether a month field is disabled, or not |
form | Returns a reference to the form that contains the month field |
list | Returns a reference to the datalist that contains the month field |
max | Sets or returns the value of the max attribute of the month field |
min | Sets or returns the value of the min attribute of the month field |
name | Sets or returns the value of the name attribute of a month field |
readOnly | Sets or returns whether the month field is read-only, or not |
required | Sets or returns whether the month field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the month field |
type | Returns which type of form element the month field is |
value | Sets or returns the value of the value attribute of a month field |
Method | Description |
---|---|
stepDown() | Decrements the value of the month field by a specified number |
stepUp() | Increments the value of the month field by a specified number |
The Input Month object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Number Object is new in HTML5.
The Input Number object represents an HTML <input> element with type="number".
Note: <input> elements with type="number" are not supported in Internet Explorer 9 and earlier versions.
You can access an <input> element with type="number" by using getElementById():
Tip: You can also access <input type="number"> by searching through the elements collection of a form.
You can create an <input> element with type="number" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a number field |
autofocus | Sets or returns whether a number field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a number field |
disabled | Sets or returns whether a number field is disabled, or not |
form | Returns a reference to the form that contains the number field |
list | Returns a reference to the datalist that contains the number field |
max | Sets or returns the value of the max attribute of a number field |
min | Sets or returns the value of the min attribute of a number field |
name | Sets or returns the value of the name attribute of a number field |
placeholder | Sets or returns the value of the placeholder attribute of a number field |
readOnly | Sets or returns whether the number field is read-only, or not |
required | Sets or returns whether the number field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of a number field |
type | Returns which type of form element the number field is |
value | Sets or returns the value of the value attribute of a number field |
Method | Description |
---|---|
stepDown() | Decrements the value of the input number by a specified number |
stepUp() | Increments the value of the input number by a specified number |
The Input Number object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Password object represents an HTML <input> element with type="password".
You can access an <input> element with type="password" by using getElementById():
Tip: You can also access <input type="password"> by searching through the elements collection of a form.
You can create an <input> element with type="password" by using the document.createElement() method:
var x = document.createElement("INPUT");
x.setAttribute("type", "password");
Try it Yourself »
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a password field |
autofocus | Sets or returns whether a password field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a password field |
disabled | Sets or returns whether the password field is disabled, or not |
form | Returns a reference to the form that contains the password field |
maxLength | Sets or returns the value of the maxlength attribute of a password field |
name | Sets or returns the value of the name attribute of a password field |
pattern | Sets or returns the value of the pattern attribute of a password field |
placeholder | Sets or returns the value of the placeholder attribute of a password field |
readOnly | Sets or returns whether a password field is read-only, or not |
required | Sets or returns whether the password field must be filled out before submitting a form |
size | Sets or returns the value of the size attribute of a password field |
type | Returns which type of form element a password field is |
value | Sets or returns the value of the value attribute of the password field |
Method | Description |
---|---|
select() | Selects the content of a password field |
The Input Password object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Radio object represents an HTML <input> element with type="radio".
You can access an <input> element with type="radio" by using getElementById():
Tip: You can also access <input type="radio"> by searching through the elements collection of a form.
You can create an <input> element with type="radio" by using the document.createElement() method:
Property | Description |
---|---|
autofocus | Sets or returns whether a radio button should automatically get focus when the page loads |
checked | Sets or returns the checked state of a radio button |
defaultChecked | Returns the default value of the checked attribute |
defaultValue | Sets or returns the default value of a radio button |
disabled | Sets or returns whether the radio button is disabled, or not |
form | Returns a reference to the form that contains the radio button |
name | Sets or returns the value of the name attribute of a radio button |
required | Sets or returns whether the radio button must be checked before submitting a form |
type | Returns which type of form element the radio button is |
value | Sets or returns the value of the value attribute of the radio button |
The Input Radio object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Range Object is new in HTML5.
The Input Range object represents an HTML <input> element with type="range".
Note: <input> elements with type="range" are not supported in Internet Explorer 9 and earlier versions.
You can access an <input> element with type="range" by using getElementById():
Tip: You can also access <input type="range"> by searching through the elements collection of a form.
You can create an <input> element with type="range" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a slider control |
autofocus | Sets or returns whether a slider control should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a slider control |
disabled | Sets or returns whether a slider control is disabled, or not |
form | Returns a reference to the form that contains the slider control |
list | Returns a reference to the datalist that contains the slider control |
max | Sets or returns the value of the max attribute of the slider control |
min | Sets or returns the value of the min attribute of the slider control |
name | Sets or returns the value of the name attribute of a slider control |
step | Sets or returns the value of the step attribute of the slider control |
type | Returns which type of form element the slider control is |
value | Sets or returns the value of the value attribute of a slider control |
Method | Description |
---|---|
stepDown() | Decrements the value of the slider control by a specified number |
stepUp() | Increments the value of the slider control by a specified number |
The Input Range object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Reset object represents an HTML <input> element with type="reset".
You can access an <input> element with type="reset" by using getElementById():
Tip: You can also access <input type="reset"> by searching through the elements collection of a form.
You can create an <input> element with type="reset" by using the document.createElement() method:
Property | Description |
---|---|
autofocus | Sets or returns whether a reset button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a reset button |
disabled | Sets or returns whether the reset button is disabled, or not |
form | Returns a reference to the form that contains the reset button |
name | Sets or returns the value of the name attribute of a reset button |
type | Returns which type of form element the reset button is |
value | Sets or returns the value of the value attribute of the reset button |
The Input Reset object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Search Object is new in HTML5.
The Input Search object represents an HTML <input> element with type="search".
You can access an <input> element with type="search" by using getElementById():
Tip: You can also access <input type="search"> by searching through the elements collection of a form.
You can create an <input> element with type="search" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a search field |
autofocus | Sets or returns whether a search field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a search field |
disabled | Sets or returns whether a search field is disabled, or not |
form | Returns a reference to the form that contains the search field |
list | Returns a reference to the datalist that contains the search field |
maxLength | Sets or returns the value of the maxlength attribute of a search field |
name | Sets or returns the value of the name attribute of a search field |
pattern | Sets or returns the value of the pattern attribute of a search field |
placeholder | Sets or returns the value of the placeholder attribute of a search field |
readOnly | Sets or returns whether the search field is read-only, or not |
required | Sets or returns whether the search field must be filled out before submitting a form |
size | Sets or returns the value of the size attribute of the search field |
type | Returns which type of form element the search field is |
value | Sets or returns the value of the value attribute of a search field |
The Input Search object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Submit object represents an HTML <input> element with type="submit".
You can access an <input> element with type="submit" by using getElementById():
Tip: You can also access <input type="submit"> by searching through the elements collection of a form.
You can create an <input> element with type="submit" by using the document.createElement() method:
Property | Description |
---|---|
autofocus | Sets or returns whether a submit button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a submit button |
disabled | Sets or returns whether the submit button is disabled, or not |
form | Returns a reference to the form that contains the submit button |
formAction | Sets or returns the value of the formaction attribute of a submit button |
formEnctype | Sets or returns the value of the formenctype attribute of a submit button |
formMethod | Sets or returns the value of the formmethod attribute of a submit button |
formNoValidate | Sets or returns whether the form-data should be validated or not, on submission |
formTarget | Sets or returns the value of the formtarget attribute of a submit button |
name | Sets or returns the value of the name attribute of a submit button |
type | Returns which type of form element the submit button is |
value | Sets or returns the value of the value attribute of the submit button |
The Input Submit object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Text object represents an HTML <input> element with type="text".
You can access an <input> element with type="text" by using getElementById():
Tip: You can also access <input type="text"> by searching through the elements collection of a form.
You can create an <input> element with type="text" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a text field |
autofocus | Sets or returns whether a text field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a text field |
disabled | Sets or returns whether the text field is disabled, or not |
form | Returns a reference to the form that contains the text field |
list | Returns a reference to the datalist that contains the text field |
maxLength | Sets or returns the value of the maxlength attribute of a text field |
name | Sets or returns the value of the name attribute of a text field |
pattern | Sets or returns the value of the pattern attribute of a text field |
placeholder | Sets or returns the value of the placeholder attribute of a text field |
readOnly | Sets or returns whether a text field is read-only, or not |
required | Sets or returns whether the text field must be filled out before submitting a form |
size | Sets or returns the value of the size attribute of a text field |
type | Returns which type of form element a text field is |
value | Sets or returns the value of the value attribute of the text field |
The Input Text object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Time object represents an HTML <input> element with type="time".
Note: <input> elements with type="time" do not show as any time field in Firefox, or in IE12 and earlier versions.
You can access an <input> element with type="time" by using getElementById():
Tip: You can also access <input type="time"> by searching through the elements collection of a form.
You can create an <input> element with type="time" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a time field |
autofocus | Sets or returns whether a time field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a time field |
disabled | Sets or returns whether a time field is disabled, or not |
form | Returns a reference to the form that contains the time field |
list | Returns a reference to the datalist that contains the time field |
max | Sets or returns the value of the max attribute of the time field |
min | Sets or returns the value of the min attribute of the time field |
name | Sets or returns the value of the name attribute of a time field |
readOnly | Sets or returns whether the time field is read-only, or not |
required | Sets or returns whether the time field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the time field |
type | Returns which type of form element the time field is |
value | Sets or returns the value of the value attribute of a time field |
Method | Description |
---|---|
stepDown() | Decrements the value of the time field by a specified number |
stepUp() | Increments the value of the time field by a specified number |
The Input Time object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input URL Object is new in HTML5.
The Input URL object represents an HTML <input> element with type="url".
Note: <input> elements with type="url" are not supported in Internet Explorer 9 (and earlier versions), or Safari.
You can access an <input> element with type="url" by using getElementById():
Tip: You can also access <input type="url"> by searching through the elements collection of a form.
You can create an <input> element with type="url" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a URL field |
autofocus | Sets or returns whether a URL field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a URL field |
disabled | Sets or returns whether a URL field is disabled, or not |
form | Returns a reference to the form that contains the URL field |
list | Returns a reference to the datalist that contains the URL field |
maxLength | Sets or returns the value of the maxlength attribute of a URL field |
name | Sets or returns the value of the name attribute of a URL field |
pattern | Sets or returns the value of the pattern attribute of a URL field |
placeholder | Sets or returns the value of the placeholder attribute of a URL field |
readOnly | Sets or returns whether the URL field is read-only, or not |
required | Sets or returns whether the URL field must be filled out before submitting a form |
size | Sets or returns the value of the size attribute of the URL field |
type | Returns which type of form element the URL field is |
value | Sets or returns the value of the value attribute of a URL field |
The Input URL object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Input Week Object is new in HTML5.
The Input Week object represents an HTML <input> element with type="week".
Note: <input> elements with type="week" are not supported in Firefox, or in IE12 and earlier versions.
You can access an <input> element with type="week" by using getElementById():
Tip: You can also access <input type="week"> by searching through the elements collection of a form.
You can create an <input> element with type="week" by using the document.createElement() method:
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a week field |
autofocus | Sets or returns whether a week field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a week field |
disabled | Sets or returns whether a week field is disabled, or not |
form | Returns a reference to the form that contains the week field |
list | Returns a reference to the datalist that contains the week field |
max | Sets or returns the value of the max attribute of the week field |
min | Sets or returns the value of the min attribute of the week field |
name | Sets or returns the value of the name attribute of a week field |
readOnly | Sets or returns whether the week field is read-only, or not |
required | Sets or returns whether the week field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the week field |
type | Returns which type of form element the week field is |
value | Sets or returns the value of the value attribute of a week field |
Method | Description |
---|---|
stepDown() | Decrements the value of the week field by a specified number |
stepUp() | Increments the value of the week field by a specified number |
The Input Week object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <input> tag
HTML reference: HTML <input> type attribute
The Kbd object represents an HTML <kbd> element.
You can access a <kbd> element by using getElementById():
You can create a <kbd> element by using the document.createElement() method:
The Kbd object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <kbd> tag
The Label object represents an HTML <label> element.
You can access a <label> element by using getElementById():
You can create a <label> element by using the document.createElement() method:
Property | Description |
---|---|
control | Returns the labeled control |
form | Returns a reference to the form that contains the label |
htmlFor | Sets or returns the value of the for attribute of a label |
The Label object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <label> tag
The Legend object represents an HTML <legend> element.
You can access a <legend> element by using getElementById():
You can create a <legend> element by using the document.createElement() method:
Property | Description |
---|---|
form | Returns a reference to the form that contains the legend |
The Legend object also supports the standard properties and events.
HTML reference: HTML <fieldset> tag
HTML reference: HTML <legend> tag
The Li object represents an HTML <li> element.
You can access a <li> element by using getElementById():
You can create a <li> element by using the document.createElement() method:
Property | Description |
---|---|
value | Sets or returns the value of the value attribute of a list item |
The Li object also supports the standard properties and events.
HTML reference: HTML <li> tag
The Link object represents an HTML <link> element.
You can access a <link> element by using getElementById():
You can create a <link> element by using the document.createElement() method:
Property | Description |
---|---|
charset | Not supported in HTML5. Sets or returns the character encoding of the linked document |
crossOrigin | Sets or returns the the CORS settings of the linked document |
disabled | Sets or returns whether the linked document is disabled, or not |
href | Sets or returns the URL of the linked document |
hreflang | Sets or returns the language code of the linked document |
media | Sets or returns the media type for the link element |
rel | Sets or returns the relationship between the current document and the linked document |
rev | Not supported in HTML5. Sets or returns the reverse relationship from the linked document to the current document |
sizes | Returns the value of the sizes attribute of the linked resource |
type | Sets or returns the content type of the linked document |
The Link object also supports the standard properties and events.
HTML reference: HTML <link> tag
The Map object represents an HTML <map> element.
You can access a <map> element by using getElementById():
You can create a <map> element by using the document.createElement() method:
Collection | Description |
---|---|
areas | Returns a collection of all <area> elements in an image-map |
images | Returns a collection of all <img> and <object> elements associated with the image-map |
Property | Description |
---|---|
name | Sets or returns the value of the name attribute of an image-map |
The Map object also supports the standard properties and events.
HTML DOM reference: Area object
HTML reference: HTML <map> tag
HTML reference: HTML <area> tag
The Mark Object is new in HTML5.
The Mark object represents an HTML <mark> element.
Note: The <mark> element is not supported in Internet Explorer 8 and earlier versions.
You can access a <mark> element by using getElementById():
You can create a <mark> element by using the document.createElement() method:
The Mark object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <mark> tag
The Menu object represents an HTML <menu> element.
Note: The <menu> element is currently NOT supported in any of the major browsers.
You can access a <menu> element by using getElementById():
var x = document.getElementById("myMenu");
You can create a <menu> element by using the document.createElement() method:
var x = document.createElement("MENU");
Property | Description |
---|---|
label | Sets or returns the value of the label attribute of the menu |
type | Sets or returns the value of the type attribute of the menu |
The Menu object also supports the standard properties and events.
HTML reference: HTML <menu> tag
The MenuItem Object is new in HTML5.
The MenuItem object represents an HTML <menuitem> element.
Note: The <menuitem> element is currently ONLY supported in Firefox.
You can access a <menuitem> element by using getElementById():
var x = document.getElementById("myMenuItem");
You can create a <menuitem> element by using the document.createElement() method:
var x = document.createElement("MENUITEM");
Property | Description |
---|---|
checked | Sets or returns whether the menu item should be checked |
command | Sets or returns the value of the command attribute of the menu item |
default | Sets or returns whether the menu item should be the default command |
disabled | Sets or returns whether the menu item should be disabled |
icon | Sets or returns an image that represents the menu item |
label | Sets or returns the value of the label attribute of the menu item |
radiogroup | Sets or returns the value of the radiogroup attribute of the menu item |
type | Sets or returns the value of the type attribute of the menu item |
The MenuItem object also supports the standard properties and events.
HTML reference: HTML <menuitem> tag
The Meta object represents an HTML <meta> element.
You can access a <meta> element by using getElementsByTagName():
var x = document.getElementsByTagName("META")[0];
Try it Yourself »
You can create a <meta> element by using the document.createElement() method:
Property | Description |
---|---|
content | Sets or returns the value of the content attribute of a meta element |
httpEquiv | Sets or returns an HTTP header for the information in the content attribute |
name | Sets or returns a name for the information in the content attribute |
scheme | Not supported in HTML5. Sets or returns how the value of the content attribute should be interpreted |
The Meta object also supports the standard properties and events.
HTML reference: HTML <meta> tag
The Meter Object is new in HTML5.
The Meter object represents an HTML <meter> element.
Note: The <meter> element is not supported in Internet Explorer / Edge or Safari 5 (and earlier versions).
You can access a <meter> element by using getElementById():
You can create a <meter> element by using the document.createElement() method:
Property | Description |
---|---|
high | Sets or returns the value of the high attribute in a gauge |
labels | Returns a list of <label> elements that are labels for the gauge |
low | Sets or returns the value of the low attribute in a gauge |
max | Sets or returns the value of the max attribute in a gauge |
min | Sets or returns the value of the min attribute in a gauge |
optimum | Sets or returns the value of the optimum attribute in a gauge |
value | Sets or returns the value of the value attribute in a gauge |
The Meter object also supports the standard properties and events.
HTML reference: HTML <meter> tag
The Nav Object is new in HTML5.
The Nav object represents an HTML <nav> element.
Note: The <nav> element is not supported in Internet Explorer 8 and earlier versions.
You can access a <nav> element by using getElementById():
You can create a <nav> element by using the document.createElement() method:
The Nav object supports the standard properties and events.
HTML reference: HTML <nav> tag
The Object object represents an HTML <object> element.
You can access an <object> element by using getElementById():
You can create an <object> element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.cssFloat instead. Sets or returns the alignment of the object according to the surrounding text |
archive | Not supported in HTML5. Sets or returns a string that can be used to implement your own archive functionality for the object |
border | Not supported in HTML5. Use
style.border instead. Sets or returns the border around the object |
code | Not supported in HTML5. Sets or returns the URL of the file that contains the compiled Java class |
codeBase | Not supported in HTML5. Sets or returns the URL of the component |
codeType | Not supported in HTML5. |
data | Sets or returns the URL of the resource to be used by the object |
declare | Not supported in HTML5. |
form | Returns a reference to the object's parent form |
height | Sets or returns the height of the object |
hspace | Not supported in HTML5. Use
style.margin instead. Sets or returns the horizontal margin of the object |
name | Sets or returns the name of the object |
standby | Not supported in HTML5. Sets or returns a message when loading the object |
type | Sets or returns the content type for data downloaded via the data attribute |
useMap | Sets or returns the name of a client-side image map to be used with the object |
vspace | Not supported in HTML5. Use
style.margin instead. Sets or returns the vertical margin of the object |
width | Sets or returns the width of the object |
The Object object also supports the standard properties and events.
HTML reference: HTML <object> tag
The Ol object represents an HTML <ol> element.
You can access an <ol> element by using getElementById():
You can create an <ol> element by using the document.createElement() method:
Property | Description |
---|---|
compact | Not supported in HTML5. Use style.lineHeight instead. Sets or returns whether the list should render smaller than normal, or not |
reversed | Sets or returns whether the list order should be descending or not |
start | Sets or returns the value of the start attribute of an ordered list |
type | Sets or returns the value of the type attribute of an ordered list |
The Ol object also supports the standard properties and events.
HTML reference: HTML <ol> tag
The OptionGroup object represents an HTML <optgroup> element.
You can access an <optgroup> element by using getElementById():
You can create an <optgroup> element by using the document.createElement() method:
Property | Description |
---|---|
disabled | Sets or returns whether an option-group is disabled, or not |
label | Sets or returns the value the label attribute of an option-group |
The OptionGroup object also supports the standard properties and events.
HTML reference: HTML <optgroup> tag
The Option object represents an HTML <option> element.
You can access an <option> element by using getElementById():
Tip: You can also access an Option object by searching through the elements collection of a form, or the options collection of a drop-down list.
You can create an <option> element by using the document.createElement() method:
Property | Description |
---|---|
defaultSelected | Returns the default value of the selected attribute |
disabled | Sets or returns whether an option is disabled, or not |
form | Returns a reference to the form that contains the option |
index | Sets or returns the index position of an option in a drop-down list |
label | Sets or returns the value of the label attribute of an option in a drop-down list |
selected | Sets or returns the selected state of an option |
text | Sets or returns the text of an option |
value | Sets or returns the value of an option to be sent to the server |
The Option object also supports the standard properties and events.
HTML reference: HTML <option> tag
The Output Object is new in HTML5.
The Output object represents an HTML <output> element.
Note: The <output> element is not supported in Internet Explorer / Edge.
You can access an <output> element by using getElementById():
Tip: You can also access an <output> element by searching through the elements collection of a form.
You can create an <output> element by using the document.createElement() method:
Property | Description |
---|---|
defaultValue | Sets or returns the default value of an <output> element |
form | Returns a reference to the form that contains the <output> element |
htmlFor | Returns the value of the for attribute of an <output> element |
labels | Returns a list of <label> elements associated with the <output> element |
name | Sets or returns the value of the name attribute of an <output> element |
type | Returns which type of HTML element the Output object represents |
value | Sets or returns the value of an <output> element |
The Output object also supports the standard properties and events.
HTML reference: HTML <output> tag
The Paragraph object represents an HTML <p> element.
You can access a <p> element by using getElementById():
You can create a <p> element by using the document.createElement() method:
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign instead. Sets or returns the value of the align attribute of the paragraph |
The Paragraph object also supports the standard properties and events.
HTML tutorial: HTML Paragraphs
HTML reference: HTML <p> tag
The Parameter object represents an HTML <param> element.
The <param> element is used to define parameters for plugins embedded with an <object> element.
You can access a <param> element by using getElementById():
You can create a <param> element by using the document.createElement() method:
Property | Description |
---|---|
name | Sets or returns the value of the name attribute of a parameter |
value | Sets or returns the value of the value attribute of a parameter |
The Parameter object also supports the standard properties and events.
HTML tutorial: HTML Plug-ins
HTML reference: HTML <param> tag
HTML reference: HTML <object> tag
The Pre object represents an HTML <pre> element.
You can access a <pre> element by using getElementById():
You can create a <pre> element by using the document.createElement() method:
Property | Description |
---|---|
width | Not supported in HTML5. Use
style.width instead. Sets or returns the value of the width attribute of the preformatted text |
The Pre object also supports the standard properties and events.
HTML Tutorial: HTML Text Formatting
HTML Reference: HTML <pre> tag
The Progress Object is new in HTML5.
The Progress object represents an HTML <progress> element.
The <progress> element represents the progress of a task.
You can access a <progress> element by using getElementById():
You can create a <progress> element by using the document.createElement() method:
Property | Description |
---|---|
labels | Returns a list of the progress bar's labels (if any) |
max | Sets or returns the value of the max attribute of a progress bar |
position | Returns the current position of the progress bar |
value | Sets or returns the value of the value attribute of a progress bar |
The Progress object also supports the standard properties and events.
HTML reference: HTML <progress> tag
The Quote object represents an HTML <q> element.
You can access a <q> element by using getElementById():
You can create a <q> element by using the document.createElement() method:
Property | Description |
---|---|
cite | Sets or returns the value of the cite attribute of a quotation |
The Quote object also supports the standard properties and events.
HTML reference: HTML <q> tag
JavaScript reference: HTML DOM Blockquote Object
The S object represents an HTML <s> element.
You can access a <s> element by using getElementById():
You can create a <s> element by using the document.createElement() method:
The S object also supports the standard properties and events.
HTML tutorial: HTML Text Formatting
HTML reference: HTML <s> tag
JavaScript reference: HTML DOM Del Object
The Samp object represents an HTML <samp> element.
You can access a <samp> element by using getElementById():
You can create a <samp> element by using the document.createElement() method:
The Samp object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <samp> tag
The Script object represents an HTML <script> element.
You can access a <script> element by using getElementById():
Tip: You can also access a <script> element by using the scripts collection.
You can create a <script> element by using the document.createElement() method:
Property | Description |
---|---|
async | Sets or returns whether a script should be executed asynchronously as soon as it is available |
charset | Sets or returns the value of the charset attribute of a script |
crossOrigin | Sets or returns the the CORS settings of a script |
defer | Sets or returns whether a script should be executed when the page has finished parsing |
src | Sets or returns the value of the src attribute of a script |
text | Sets or returns the contents of all the text nodes that are children of a script |
type | Sets or returns the value of the type attribute of a script |
The Script object also supports the standard properties and events.
HTML reference: HTML <script> tag
The Section Object is new in HTML5.
The Section object represents an HTML <section> element.
Note: The <section> element is not supported in Internet Explorer 8 and earlier versions.
You can access a <section> element by using getElementById():
You can create a <section> element by using the document.createElement() method:
The Section object supports the standard properties and events.
HTML reference: HTML <section> tag
The Select object represents an HTML <select> element.
You can access a <select> element by using getElementById():
Tip: You can also access a Select object by searching through the elements collection of a form.
You can create a <select> element by using the document.createElement() method:
Collection | Description |
---|---|
options | Returns a collection of all the options in a drop-down list |
Property | Description |
---|---|
disabled | Sets or returns whether the drop-down list is disabled, or not |
form | Returns a reference to the form that contains the drop-down list |
length | Returns the number of <option> elements in a drop-down list |
multiple | Sets or returns whether more than one option can be selected from the drop-down list |
name | Sets or returns the value of the name attribute of a drop-down list |
selectedIndex | Sets or returns the index of the selected option in a drop-down list |
size | Sets or returns the value of the size of a drop-down list |
type | Returns which type of form element a drop-down list is |
value | Sets or returns the value of the selected option in a drop-down list |
Method | Description |
---|---|
add() | Adds an option to a drop-down list |
remove() | Removes an option from a drop-down list |
The Select object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <select> tag
The Small object represents an HTML <small> element.
You can access a <small> element by using getElementById():
You can create a <small> element by using the document.createElement() method:
The Small object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <small> tag
The Source Object is new in HTML5.
The Source object represents an HTML <source> element.
You can access a <source> element by using getElementById():
You can create a <source> element by using the document.createElement() method:
Property | Description |
---|---|
media | Sets or returns the value of the media attribute in a <source> element |
src | Sets or returns the value of the src attribute in a <source> element |
type | Sets or returns the value of the type attribute in a <source> element |
The Source object also supports the standard properties and events.
HTML tutorial: HTML5 Video
HTML tutorial: HTML5 Audio
HTML reference: HTML <source> tag
The Span object represents an HTML <span> element.
You can access a <span> element by using getElementById():
You can create a <span> element by using the document.createElement() method:
The Span object supports the standard properties and events.
HTML tutorial: HTML Blocks
HTML reference: HTML <span> tag
The Strong object represents an HTML <strong> element.
You can access a <strong> element by using getElementById():
You can create a <strong> element by using the document.createElement() method:
The Strong object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <strong> tag
JavaScript reference: HTML DOM Bold Object
The Style object represents an individual style statement.
The "CSS" column indicates in which CSS version the property is defined (CSS1, CSS2, or CSS3).
Property | Description | CSS |
---|---|---|
alignContent | Sets or returns the alignment between the lines inside a flexible container when the items do not use all available space | 3 |
alignItems | Sets or returns the alignment for items inside a flexible container | 3 |
alignSelf | Sets or returns the alignment for selected items inside a flexible container | 3 |
animation | A shorthand property for all the animation properties below, except the animationPlayState property | 3 |
animationDelay | Sets or returns when the animation will start | 3 |
animationDirection | Sets or returns whether or not the animation should play in reverse on alternate cycles | 3 |
animationDuration | Sets or returns how many seconds or milliseconds an animation takes to complete one cycle | 3 |
animationFillMode | Sets or returns what values are applied by the animation outside the time it is executing | 3 |
animationIterationCount | Sets or returns the number of times an animation should be played | 3 |
animationName | Sets or returns a name for the @keyframes animation | 3 |
animationTimingFunction | Sets or returns the speed curve of the animation | 3 |
animationPlayState | Sets or returns whether the animation is running or paused | 3 |
background | Sets or returns all the background properties in one declaration | 1 |
backgroundAttachment | Sets or returns whether a background-image is fixed or scrolls with the page | 1 |
backgroundColor | Sets or returns the background-color of an element | 1 |
backgroundImage | Sets or returns the background-image for an element | 1 |
backgroundPosition | Sets or returns the starting position of a background-image | 1 |
backgroundRepeat | Sets or returns how to repeat (tile) a background-image | 1 |
backgroundClip | Sets or returns the painting area of the background | 3 |
backgroundOrigin | Sets or returns the positioning area of the background images | 3 |
backgroundSize | Sets or returns the size of the background image | 3 |
backfaceVisibility | Sets or returns whether or not an element should be visible when not facing the screen | 3 |
border | Sets or returns borderWidth, borderStyle, and borderColor in one declaration | 1 |
borderBottom | Sets or returns all the borderBottom* properties in one declaration | 1 |
borderBottomColor | Sets or returns the color of the bottom border | 1 |
borderBottomLeftRadius | Sets or returns the shape of the border of the bottom-left corner | 3 |
borderBottomRightRadius | Sets or returns the shape of the border of the bottom-right corner | 3 |
borderBottomStyle | Sets or returns the style of the bottom border | 1 |
borderBottomWidth | Sets or returns the width of the bottom border | 1 |
borderCollapse | Sets or returns whether the table border should be collapsed into a single border, or not | 2 |
borderColor | Sets or returns the color of an element's border (can have up to four values) | 1 |
borderImage | A shorthand property for setting or returning all the borderImage* properties | 3 |
borderImageOutset | Sets or returns the amount by which the border image area extends beyond the border box | 3 |
borderImageRepeat | Sets or returns whether the image-border should be repeated, rounded or stretched | 3 |
borderImageSlice | Sets or returns the inward offsets of the image-border | 3 |
borderImageSource | Sets or returns the image to be used as a border | 3 |
borderImageWidth | Sets or returns the widths of the image-border | 3 |
borderLeft | Sets or returns all the borderLeft* properties in one declaration | 1 |
borderLeftColor | Sets or returns the color of the left border | 1 |
borderLeftStyle | Sets or returns the style of the left border | 1 |
borderLeftWidth | Sets or returns the width of the left border | 1 |
borderRadius | A shorthand property for setting or returning all the four border*Radius properties | 3 |
borderRight | Sets or returns all the borderRight* properties in one declaration | 1 |
borderRightColor | Sets or returns the color of the right border | 1 |
borderRightStyle | Sets or returns the style of the right border | 1 |
borderRightWidth | Sets or returns the width of the right border | 1 |
borderSpacing | Sets or returns the space between cells in a table | 2 |
borderStyle | Sets or returns the style of an element's border (can have up to four values) | 1 |
borderTop | Sets or returns all the borderTop* properties in one declaration | 1 |
borderTopColor | Sets or returns the color of the top border | 1 |
borderTopLeftRadius | Sets or returns the shape of the border of the top-left corner | 3 |
borderTopRightRadius | Sets or returns the shape of the border of the top-right corner | 3 |
borderTopStyle | Sets or returns the style of the top border | 1 |
borderTopWidth | Sets or returns the width of the top border | 1 |
borderWidth | Sets or returns the width of an element's border (can have up to four values) | 1 |
bottom | Sets or returns the bottom position of a positioned element | 2 |
boxDecorationBreak | Sets or returns the behaviour of the background and border of an element at page-break, or, for in-line elements, at line-break. | 3 |
boxShadow | Attaches one or more drop-shadows to the box | 3 |
boxSizing | Allows you to define certain elements to fit an area in a certain way | 3 |
captionSide | Sets or returns the position of the table caption | 2 |
clear | Sets or returns the position of the element relative to floating objects | 1 |
clip | Sets or returns which part of a positioned element is visible | 2 |
color | Sets or returns the color of the text | 1 |
columnCount | Sets or returns the number of columns an element should be divided into | 3 |
columnFill | Sets or returns how to fill columns | 3 |
columnGap | Sets or returns the gap between the columns | 3 |
columnRule | A shorthand property for setting or returning all the columnRule* properties | 3 |
columnRuleColor | Sets or returns the color of the rule between columns | 3 |
columnRuleStyle | Sets or returns the style of the rule between columns | 3 |
columnRuleWidth | Sets or returns the width of the rule between columns | 3 |
columns | A shorthand property for setting or returning columnWidth and columnCount | 3 |
columnSpan | Sets or returns how many columns an element should span across | 3 |
columnWidth | Sets or returns the width of the columns | 3 |
content | Used with the :before and :after pseudo-elements, to insert generated content | 2 |
counterIncrement | Increments one or more counters | 2 |
counterReset | Creates or resets one or more counters | 2 |
cursor | Sets or returns the type of cursor to display for the mouse pointer | 2 |
direction | Sets or returns the text direction | 2 |
display | Sets or returns an element's display type | 1 |
emptyCells | Sets or returns whether to show the border and background of empty cells, or not | 2 |
filter | Sets or returns image filters (visual effects, like blur and saturation) | 3 |
flex | Sets or returns the length of the item, relative to the rest | 3 |
flexBasis | Sets or returns the initial length of a flexible item | 3 |
flexDirection | Sets or returns the direction of the flexible items | 3 |
flexFlow | A shorthand property for the flexDirection and the flexWrap properties | 3 |
flexGrow | Sets or returns how much the item will grow relative to the rest | 3 |
flexShrink | Sets or returns how the item will shrink relative to the rest | 3 |
flexWrap | Sets or returns whether the flexible items should wrap or not | 3 |
cssFloat | Sets or returns the horizontal alignment of an element | 1 |
font | Sets or returns fontStyle, fontVariant, fontWeight, fontSize, lineHeight, and fontFamily in one declaration | 1 |
fontFamily | Sets or returns the font family for text | 1 |
fontSize | Sets or returns the font size of the text | 1 |
fontStyle | Sets or returns whether the style of the font is normal, italic or oblique | 1 |
fontVariant | Sets or returns whether the font should be displayed in small capital letters | 1 |
fontWeight | Sets or returns the boldness of the font | 1 |
fontSizeAdjust | Preserves the readability of text when font fallback occurs | 3 |
fontStretch | Selects a normal, condensed, or expanded face from a font family | 3 |
hangingPunctuation | Specifies whether a punctuation character may be placed outside the line box | 3 |
height | Sets or returns the height of an element | 1 |
hyphens | Sets how to split words to improve the layout of paragraphs | 3 |
icon | Provides the author the ability to style an element with an iconic equivalent | 3 |
imageOrientation | Specifies a rotation in the right or clockwise direction that a user agent applies to an image | 3 |
justifyContent | Sets or returns the alignment between the items inside a flexible container when the items do not use all available space. | 3 |
left | Sets or returns the left position of a positioned element | 2 |
letterSpacing | Sets or returns the space between characters in a text | 1 |
lineHeight | Sets or returns the distance between lines in a text | 1 |
listStyle | Sets or returns listStyleImage, listStylePosition, and listStyleType in one declaration | 1 |
listStyleImage | Sets or returns an image as the list-item marker | 1 |
listStylePosition | Sets or returns the position of the list-item marker | 1 |
listStyleType | Sets or returns the list-item marker type | 1 |
margin | Sets or returns the margins of an element (can have up to four values) | 1 |
marginBottom | Sets or returns the bottom margin of an element | 1 |
marginLeft | Sets or returns the left margin of an element | 1 |
marginRight | Sets or returns the right margin of an element | 1 |
marginTop | Sets or returns the top margin of an element | 1 |
maxHeight | Sets or returns the maximum height of an element | 2 |
maxWidth | Sets or returns the maximum width of an element | 2 |
minHeight | Sets or returns the minimum height of an element | 2 |
minWidth | Sets or returns the minimum width of an element | 2 |
navDown | Sets or returns where to navigate when using the arrow-down navigation key | 3 |
navIndex | Sets or returns the tabbing order for an element | 3 |
navLeft | Sets or returns where to navigate when using the arrow-left navigation key | 3 |
navRight | Sets or returns where to navigate when using the arrow-right navigation key | 3 |
navUp | Sets or returns where to navigate when using the arrow-up navigation key | 3 |
opacity | Sets or returns the opacity level for an element | 3 |
order | Sets or returns the order of the flexible item, relative to the rest | 3 |
orphans | Sets or returns the minimum number of lines for an element that must be left at the bottom of a page when a page break occurs inside an element | 2 |
outline | Sets or returns all the outline properties in one declaration | 2 |
outlineColor | Sets or returns the color of the outline around a element | 2 |
outlineOffset | Offsets an outline, and draws it beyond the border edge | 3 |
outlineStyle | Sets or returns the style of the outline around an element | 2 |
outlineWidth | Sets or returns the width of the outline around an element | 2 |
overflow | Sets or returns what to do with content that renders outside the element box | 2 |
overflowX | Specifies what to do with the left/right edges of the content, if it overflows the element's content area | 3 |
overflowY | Specifies what to do with the top/bottom edges of the content, if it overflows the element's content area | 3 |
padding | Sets or returns the padding of an element (can have up to four values) | 1 |
paddingBottom | Sets or returns the bottom padding of an element | 1 |
paddingLeft | Sets or returns the left padding of an element | 1 |
paddingRight | Sets or returns the right padding of an element | 1 |
paddingTop | Sets or returns the top padding of an element | 1 |
pageBreakAfter | Sets or returns the page-break behavior after an element | 2 |
pageBreakBefore | Sets or returns the page-break behavior before an element | 2 |
pageBreakInside | Sets or returns the page-break behavior inside an element | 2 |
perspective | Sets or returns the perspective on how 3D elements are viewed | 3 |
perspectiveOrigin | Sets or returns the bottom position of 3D elements | 3 |
position | Sets or returns the type of positioning method used for an element (static, relative, absolute or fixed) | 2 |
quotes | Sets or returns the type of quotation marks for embedded quotations | 2 |
resize | Sets or returns whether or not an element is resizable by the user | 3 |
right | Sets or returns the right position of a positioned element | 2 |
tableLayout | Sets or returns the way to lay out table cells, rows, and columns | 2 |
tabSize | Sets or returns the length of the tab-character | 3 |
textAlign | Sets or returns the horizontal alignment of text | 1 |
textAlignLast | Sets or returns how the last line of a block or a line right before a forced line break is aligned when text-align is "justify" | 3 |
textDecoration | Sets or returns the decoration of a text | 1 |
textDecorationColor | Sets or returns the color of the text-decoration | 3 |
textDecorationLine | Sets or returns the type of line in a text-decoration | 3 |
textDecorationStyle | Sets or returns the style of the line in a text decoration | 3 |
textIndent | Sets or returns the indentation of the first line of text | 1 |
textJustify | Sets or returns the justification method used when text-align is "justify" | 3 |
textOverflow | Sets or returns what should happen when text overflows the containing element | 3 |
textShadow | Sets or returns the shadow effect of a text | 3 |
textTransform | Sets or returns the capitalization of a text | 1 |
top | Sets or returns the top position of a positioned element | 2 |
transform | Applies a 2D or 3D transformation to an element | 3 |
transformOrigin | Sets or returns the position of transformed elements | 3 |
transformStyle | Sets or returns how nested elements are rendered in 3D space | 3 |
transition | A shorthand property for setting or returning the four transition properties | 3 |
transitionProperty | Sets or returns the CSS property that the transition effect is for | 3 |
transitionDuration | Sets or returns how many seconds or milliseconds a transition effect takes to complete | 3 |
transitionTimingFunction | Sets or returns the speed curve of the transition effect | 3 |
transitionDelay | Sets or returns when the transition effect will start | 3 |
unicodeBidi | Sets or returns whether the text should be overridden to support multiple languages in the same document | 2 |
userSelect | Sets or returns whether the text of an element can be selected or not | 2 |
verticalAlign | Sets or returns the vertical alignment of the content in an element | 1 |
visibility | Sets or returns whether an element should be visible | 2 |
whiteSpace | Sets or returns how to handle tabs, line breaks and whitespace in a text | 1 |
width | Sets or returns the width of an element | 1 |
wordBreak | Sets or returns line breaking rules for non-CJK scripts | 3 |
wordSpacing | Sets or returns the spacing between words in a text | 1 |
wordWrap | Allows long, unbreakable words to be broken and wrap to the next line | 3 |
widows | Sets or returns the minimum number of lines for an element that must be visible at the top of a page | 2 |
zIndex | Sets or returns the stack order of a positioned element | 2 |
The Style object can be accessed from the head section of the document, or from specific HTML element(s).
Accessing style object(s) from the head section of the document:
Accessing a specified element's style object:
You can create a <style> element by using the document.createElement() method:
You can also set the style properties of an existing element:
HTML tutorial: HTML CSS
CSS tutorial: CSS Tutorial
HTML reference: HTML <style> tag
CSS reference: CSS Properties
The Subscript object represents an HTML <sub> element.
You can access a <sub> element by using getElementById():
You can create a <sub> element by using the document.createElement() method:
The Subscript object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <sub> tag
JavaScript reference: HTML DOM Superscript Object
The Summary Object is new in HTML5.
The Summary object represents an HTML <summary> element.
Note: The <summary> element is currently only supported in Chrome, Safari 6+ and Opera 15+.
You can access a <summary> element by using getElementById():
You can create a <summary> element by using the document.createElement() method:
The Summary object also supports the standard properties and events.
HTML reference: HTML <summary> tag
HTML reference: HTML <details> tag
JavaScript reference: HTML DOM Details Object
The Superscript object represents an HTML <sup> element.
You can access a <sup> element by using getElementById():
You can create a <sup> element by using the document.createElement() method:
The Superscript object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <sup> tag
JavaScript reference: HTML DOM Subscript Object
The Table object represents an HTML <table> element.
You can access a <table> element by using getElementById():
You can create a <table> element by using the document.createElement() method:
Collection | Description |
---|---|
rows | Returns a collection of all <tr> elements in a table |
tBodies | Returns a collection of all <tbody> elements in a table |
Property | Description |
---|---|
align | Not supported in HTML5. Use style.cssFloat instead. Sets or returns the alignment of a table according to surrounding text |
background | Not supported in HTML5. Use
style.background instead. Sets or returns the background image of a table |
bgColor | Not supported in HTML5. Use
style.backgroundColor instead. Sets or returns the background color of a table |
border | Deprecated. Use style.border instead. Sets or returns the width of the table border. |
caption | Returns the <caption> element of a table |
cellPadding | Not supported in HTML5. Use
style.padding instead. Sets or returns the amount of space between the cell border and cell content |
cellSpacing | Not supported in HTML5. Use style.borderSpacing instead. Sets or returns the amount of space between the cells in a table |
frame | Not supported in HTML5. Sets or returns which outer-borders (of a table) that should be displayed |
height | Not supported in HTML5. Use style.height instead. Sets or returns the height of a table |
rules | Not supported in HTML5. Sets or returns which inner-borders (between the cells) that should be displayed in a table |
summary | Not supported in HTML5. Sets or returns a description of the data in a table |
tFoot | Returns a reference to the <tfoot> element of a table |
tHead | Returns a reference to the <thead> element of a table |
width | Not supported in HTML5. Use style.width instead. Sets or returns the width of the table |
Method | Description |
---|---|
createCaption() | Creates an empty <caption> element and adds it to the table |
createTFoot() | Creates an empty <tfoot> element and adds it to the table |
createTHead() | Creates an empty <thead> element and adds it to the table |
deleteCaption() | Removes the first <caption> element from the table |
deleteRow() | Removes a row (<tr>) from the table |
deleteTFoot() | Removes the <tfoot> element from the table |
deleteTHead() | Removes the <thead> element from the table |
insertRow() | Creates an empty <tr> element and adds it to the table |
The Table object also supports the standard properties and events.
HTML tutorial: HTML Tables
HTML reference: HTML <table> tag
The TableData object represents an HTML <td> element.
You can access a <td> element by using getElementById():
Tip: You can also access a <td> element by searching through the cells collection of a table row.
You can create a <td> element by using the document.createElement() method:
Property | Description |
---|---|
abbr | Not supported in HTML5. Sets or returns the value of the abbr attribute |
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the horizontal alignment of the content in a data cell |
axis | Not supported in HTML5. Sets or returns a comma-separated list of related data cells |
background | Not supported in HTML5. Use
style.background instead. Sets or returns the background image of a data cell |
bgColor | Not supported in HTML5. Use
style.backgroundColor instead. Sets or returns the background color of a table |
cellIndex | Returns the position of a cell in the cells collection of a table row |
ch | Not supported in HTML5. Sets or returns an alignment character for a data cell |
chOff | Not supported in HTML5. Sets or returns the horizontal offset of the ch property |
colSpan | Sets or returns the value of the colspan attribute |
headers | Sets or returns the value of the headers attribute |
height | Not supported in HTML5. Use style.height instead. Sets or returns the height of a data cell |
noWrap | Not supported in HTML5. Use
style.whiteSpace instead. Sets or returns whether the content in a cell can be wrapped |
rowSpan | Sets or returns the value of the rowspan attribute |
vAlign | Not supported in HTML5. Use style.verticalAlign instead. Sets or returns the vertical alignment of the content within a cell |
width | Not supported in HTML5. Use style.width instead. Sets or returns the width of a data cell |
The TableData object also supports the standard properties and events.
HTML tutorial: HTML Tables
HTML reference: HTML <td> tag
The TableHeader object represents an HTML <th> element.
You can access a <th> element by using getElementById():
Tip: You can also access a <th> element by searching through the cells collection of a table row.
You can create a <th> element by using the document.createElement() method:
Property | Description |
---|---|
abbr | Sets or returns the value of the abbr attribute |
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the horizontal alignment of the content in a data cell |
axis | Not supported in HTML5. Sets or returns a comma-separated list of related data cells |
background | Not supported in HTML5. Use
style.background instead. Sets or returns the background image of a data cell |
bgColor | Not supported in HTML5. Use
style.backgroundColor instead. Sets or returns the background color of a table |
cellIndex | Returns the position of a cell in the cells collection of a table row |
ch | Not supported in HTML5. Sets or returns an alignment character for a data cell |
chOff | Not supported in HTML5. Sets or returns the horizontal offset of the ch property |
colSpan | Sets or returns the value of the colspan attribute |
headers | Sets or returns the value of the headers attribute |
height | Not supported in HTML5. Sets or returns the height of a data cell Use style.height instead |
noWrap | Not supported in HTML5. Sets or returns whether the content in a cell can be wrapped Use style.whiteSpace instead |
rowSpan | Sets or returns the value of the rowspan attribute |
vAlign | Not supported in HTML5. Sets or returns the vertical alignment of the content within a cell Use style.verticalAlign instead |
width | Not supported in HTML5. Sets or returns the width of a data cell Use style.width instead |
The TableHeader object also supports the standard properties and events.
HTML tutorial: HTML Tables
HTML reference: HTML <th> tag
The TableRow object represents an HTML <tr> element.
You can access a <tr> element by using getElementById():
Tip: You can also access a <tr> element by searching through the rows collection of a table.
You can create a <tr> element by using the document.createElement() method:
Collection | Description |
---|---|
cells | Returns a collection of all <td> or <th> elements in a table row |
Property | Description |
---|---|
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the horizontal alignment of the content within a table row |
bgColor | Not supported in HTML5. Use
style.backgroundColor instead. Sets or returns the background color of a table row |
ch | Not supported in HTML5. Sets or returns an alignment character for cells in a table row |
chOff | Not supported in HTML5. Sets or returns the horizontal offset of the ch property |
height | Not supported in HTML5. Use style.height instead. Sets or returns the height of a table row. |
rowIndex | Returns the position of a row in the rows collection of a table |
sectionRowIndex | Returns the position of a row in the rows collection of a tbody, thead, or tfoot |
vAlign | Not supported in HTML5. Use
style.verticalAlign instead. Sets or returns the vertical alignment of the content within a table row |
Method | Description |
---|---|
deleteCell() | Deletes a cell from the current table row |
insertCell() | Inserts a cell into the current table row |
The TableRow object also supports the standard properties and events.
HTML tutorial: HTML Tables
HTML reference: HTML <tr> tag
The Textarea object represents an HTML <textarea> element.
You can access a <textarea> element by using getElementById():
Tip: You can also access a <textarea> element by searching through the elements collection of a form.
You can create a <textarea> element by using the document.createElement() method:
Property | Description |
---|---|
autofocus | Sets or returns whether a text area should automatically get focus when the page loads |
cols | Sets or returns the value of the cols attribute of a text area |
defaultValue | Sets or returns the default value of a text area |
disabled | Sets or returns whether the text area is disabled, or not |
form | Returns a reference to the form that contains the text area |
maxLength | Sets or returns the value of the maxlength attribute of a text area |
name | Sets or returns the value of the name attribute of a text area |
placeholder | Sets or returns the value of the placeholder attribute of a text area |
readOnly | Sets or returns whether the contents of a text area is read-only |
required | Sets or returns whether the text area must be filled out before submitting a form |
rows | Sets or returns the value of the rows attribute of a text area |
type | Returns the type of the form element the text area is |
value | Sets or returns the contents of a text area |
wrap | Sets or returns the value of the wrap attribute of a text area |
Method | Description |
---|---|
select() | Selects the entire contents of a text area |
The Textarea object also supports the standard properties and events.
HTML tutorial: HTML Forms
HTML reference: HTML <textarea> tag
The Time Object is new in HTML5.
The Time object represents an HTML <time> element.
You can access a <time> element by using getElementById():
You can create a <time> element by using the document.createElement() method:
Property | Description |
---|---|
dateTime | Sets or returns the value of the datetime attribute in a <time> element |
The Time object also supports the standard properties and events.
HTML reference: HTML <time> tag
The Title object represents an HTML <title> element.
You can access a <title> element by using getElementsByTagName():
You can create a <title> element by using the document.createElement() method:
Property | Description |
---|---|
text | Sets or returns the text of the document's title |
The Title object also supports the standard properties and events.
HTML tutorial: HTML Head
HTML reference: HTML <title> tag
The Track Object is new in HTML5.
The Track object represents an HTML <track> element.
You can access a <track> element by using getElementById():
var x = document.getElementById("myTrack");
You can create a <track> element by using the document.createElement() method:
var x = document.createElement("TRACK");
Property | Description |
---|---|
default | Sets or returns the default state of the track |
kind | Sets or returns the value of the kind attribute of the track |
label | Sets or returns the value of the label attribute of the track |
readyState | Returns the current state of the track resource |
src | Sets or returns the value of the src attribute of the track |
srclang | Sets or returns the value of the srclang attribute of the track |
track | Returns a TextTrack object representing the track element's text track data |
The Track object also supports the standard properties and events.
HTML reference: HTML <track> tag
The Underline object represents an HTML <u> element.
You can access a <u> element by using getElementById():
You can create a <u> element by using the document.createElement() method:
The Underline object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <u> tag
The Ul object represents an HTML <ul> element.
You can access a <ul> element by using getElementById():
You can create a <ul> element by using the document.createElement() method:
Property | Description |
---|---|
compact | Not supported in HTML5. Use
style.lineHeight instead. Sets or returns whether the unordered list should render smaller than normal, or not |
type | Not supported in HTML5. Use
style.listStyleType instead. Sets or returns the value of the type attribute of an unordered list |
The Ul object supports the standard properties and events.
HTML tutorial: HTML Lists
HTML reference: HTML <ul> tag
The Variable object represents an HTML <var> element.
You can access a <var> element by using getElementById():
You can create a <var> element by using the document.createElement() method:
The Variable object supports the standard properties and events.
HTML tutorial: HTML Text Formatting Elements
HTML reference: HTML <var> tag
The Video Object is new in HTML5.
The Video object represents an HTML <video> element.
Note: The <video> element is not supported in Internet Explorer 8 and earlier versions.
You can access a <video> element by using getElementById():
You can create a <video> element by using the document.createElement() method:
Property | Description |
---|---|
audioTracks | Returns an AudioTrackList object representing available audio tracks |
autoplay | Sets or returns whether a video should start playing as soon as it is ready |
buffered | Returns a TimeRanges object representing the buffered parts of a video |
controller | Returns the MediaController object representing the current media controller of a video |
controls | Sets or returns whether a video should have controls displayed (play/pause etc) |
crossOrigin | Sets or returns the CORS settings of a video |
currentSrc | Returns the URL of the current video |
currentTime | Sets or returns the current playback position in a video (in seconds) |
defaultMuted | Sets or returns whether the video should be muted by default |
defaultPlaybackRate | Sets or returns whether the default playback speed of the video |
duration | Returns the length of a video (in seconds) |
ended | Returns whether the playback of the video has ended |
error | Returns a MediaError object representing the error state of the video |
height | Sets or returns the value of the height attribute of a video |
loop | Sets or returns whether the video should start playing over again, every time it is finished |
mediaGroup | Sets or returns the name of the media group the video(s) is a part of |
muted | Sets or returns whether the sound of a video should be turned off |
networkState | Returns the current network state of a video |
paused | Sets or returns whether a video is paused |
playbackRate | Sets or returns the speed of the video playback |
played | Returns a TimeRanges object representing the played parts of the video |
poster | Sets or returns the value of the poster attribute of a video |
preload | Sets or returns the value of the preload attribute of a video |
readyState | Returns the current ready state of a video |
seekable | Returns a TimeRanges object representing the seekable parts of a video |
seeking | Returns whether the user is currently seeking in the video |
src | Sets or returns the value of the src attribute of a video |
startDate | Returns a Date object representing the current time offset |
textTracks | Returns a TextTrackList object representing the available text tracks |
videoTracks | Returns a VideoTrackList object representing the available video tracks |
volume | Sets or returns the audio volume of a video |
width | Sets or returns the value of the width attribute of a video |
Method | Description |
---|---|
addTextTrack() | Adds a new text track to the video |
canPlayType() | Checks whether the browser can play the specified video type |
load() | Re-loads the video element |
play() | Starts playing the video |
pause() | Pauses the currently playing video |
The Video object also supports the standard properties and events.
HTML tutorial: HTML5 video
HTML reference: HTML <video> tag