HTML Objects

Anchor . Abbreviation . Address . Area . Article . Aside . Audio . Bold . Base . Bdo . Blockquote . Body . BR . Button . Canvas . Caption . Cite . Code . Column . ColumnGroup . Datalist . DD . Del . Details . DFN . Dialog . Div . DList . DT . Emphasized . Embed . Fieldset . Figcaption . Figure . Footer . Form . Head . Header . Heading . HR . HTML . Italic . IFrame . Image . Ins . Input Button . Input Checkbox . Input Color . Input Date . Input Datetime . Input DatetimeLocal . Input Email . Input FileUpload . Input Hidden . Input Image . Input Month . Input Number . Input Password . Input Radio . Input Range . Input Reset . Input Search . Input Submit . Input Text . Input Time . Input URL . Input Week . Kbd . Label . Legend . Li . Link . Map . Mark . Menu . MenuItem . Meta . Meter . Nav . Object . Ol . OptionGroup . Option . Output . Paragraph . Parameter . Pre . Progress . Quote . S . Samp . Script . Section . Select . Small . Source . Span . Strong . Style . Subscript . Summary . Superscript . Table . TableData . TableHeader . TableRow . Textarea . Time . Title . Track . Underline . Ul . Variable . Video .



Anchor

Anchor Object

The Anchor object represents an HTML <a> element.

Access an Anchor Object

You can access an <a> element by using getElementById():

Example

var x = document.getElementById("myAnchor");
Try it Yourself »

Create an Anchor Object

You can create an <a> element by using the document.createElement() method:

Example

var x = document.createElement("A");
Try it Yourself »

Anchor Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Anchor object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML links

HTML reference: HTML <a> tag


Abbreviation

Abbreviation Object

The Abbreviation object represents an HTML <abbr> element.

Access an Abbreviation Object

You can access an <abbr> element by using getElementById():

Example

var x = document.getElementById("myAbbr");
Try it Yourself »

Create an Abbreviation Object

You can create an <abbr> element by using the document.createElement() method:

Example

var x = document.createElement("ABBR");
Try it Yourself »

Standard Properties and Events

The Abbreviation object supports the standard properties and events.

Related Pages

HTML reference: HTML <abbr> tag


Address

Address Object

The Address object represents an HTML <address> element.

Access an Address Object

You can access an <address> element by using getElementById():

Example

var x = document.getElementById("myAdr");
Try it Yourself »

Create an Address Object

You can create an <address> element by using the document.createElement() method:

Example

var x = document.createElement("ADDRESS");
Try it Yourself »

Standard Properties and Events

The Address object supports the standard properties and events.

Related Pages

HTML reference: HTML <address> tag


Area

Area Object

The Area object represents an HTML <area> element.

Access an Area Object

You can access an <area> element by using getElementById():

Example

var x = document.getElementById("myArea");
Try it Yourself »

Create an Area Object

You can create an <area> element by using the document.createElement() method:

Example

var x = document.createElement("AREA");
Try it Yourself »

Area Object Properties

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

Standard Properties and Events

The Area object also supports the standard properties and events.

Related Pages

HTML reference: HTML <area> tag


Article

Article Object

The Article Object is new in HTML5.

The Article object represents an HTML <article> element.

Note: The <article> element is not supported in Internet Explorer 8 and earlier versions.

Access an Article Object

You can access an <article> element by using getElementById():

Example

var x = document.getElementById("myArticle");
Try it Yourself »

Create an Article Object

You can create an <article> element by using the document.createElement() method:

Example

var x = document.createElement("ARTICLE");
Try it Yourself »

Standard Properties and Events

The Article object supports the standard properties and events.

Related Pages

HTML reference: HTML <article> tag


Aside

Aside Object

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.

Access an Aside Object

You can access an <aside> element by using getElementById():

Example

var x = document.getElementById("myAside");
Try it Yourself »

Create an Aside Object

You can create an <aside> element by using the document.createElement() method:

Example

var x = document.createElement("ASIDE");
Try it Yourself »

Standard Properties and Events

The Aside object supports the standard properties and events.

Related Pages

HTML reference: HTML <aside> tag


Audio

Audio Object

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.

Access an Audio Object

You can access an <audio> element by using getElementById():

Example

var x = document.getElementById("myAudio");
Try it Yourself »

Create an Audio Object

You can create an <audio> element by using the document.createElement() method:

Example

var x = document.createElement("AUDIO");
Try it Yourself »

Audio Object Properties

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

Audio Object Methods

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

Standard Properties and Events

The Audio object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML5 audio

HTML reference: HTML <audio> tag


Bold

Bold Object

The Bold object represents an HTML <b> element.

Access a Bold Object

You can access a <b> element by using getElementById():

Example

var x = document.getElementById("myB");
Try it Yourself »

Create a Bold Object

You can create a <b> element by using the document.createElement() method:

Example

var x = document.createElement("B");
Try it Yourself »

Standard Properties and Events

The Bold object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <b> tag

JavaScript reference: HTML DOM Strong Object


Base

Base Object

The Base object represents an HTML <base> element.

Access a Base Object

You can access a <base> element by using getElementById():

Example

var x = document.getElementById("myBase");
Try it Yourself »

Create a Base Object

You can create a <base> element by using the document.createElement() method:

Example

var x = document.createElement("BASE");
Try it Yourself »

Base Object Properties

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

Standard Properties and Events

The Base object also supports the standard properties and events.

Related Pages

HTML reference: HTML <base> tag


Bdo

Bdo Object

The Bdo object represents an HTML <bdo> element.

Access a Bdo Object

You can access a <bdo> element by using getElementById():

Example

var x = document.getElementById("myBdo");
Try it Yourself »

Create a Bdo Object

You can create a <bdo> element by using the document.createElement() method:

Example

var x = document.createElement("BDO");
Try it Yourself »

Bdo Object Properties

Property Description
dir Sets or returns the value of the dir attribute of a <bdo> element

Standard Properties and Events

The Bdo object supports the standard properties and events.

Related Pages

HTML reference: HTML <bdo> tag


Blockquote

Blockquote Object

The Blockquote object represents an HTML <blockquote> element.

Access a Blockquote Object

You can access a <blockquote> element by using getElementById():

Example

var x = document.getElementById("myBlockquote");
Try it Yourself »

Create a Blockquote Object

You can create a <blockquote> element by using the document.createElement() method:

Example

var x = document.createElement("BLOCKQUOTE");
Try it Yourself »

Blockquote Object Properties

Property Description
cite Sets or returns the value of the cite attribute of a quotation

Standard Properties and Events

The Blockquote object also supports the standard properties and events.

Related Pages

HTML reference: HTML <blockquote> tag

JavaScript reference: HTML DOM Quote Object


Body

Body Object

The Body object represents an HTML <body> element.

Access a Body Object

You can access a <body> element by using getElementsByTagName():

Example

var x = document.getElementsByTagName("BODY")[0];
Try it Yourself »

Tip: You can also access a <body> element by using the document.body property.

Create a Body Object

You can create a <body> element by using the document.createElement() method:

var x = document.createElement("BODY");

Body Object Properties

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

Standard Properties and Events

The Body object also supports the standard properties and events.

Related Pages

HTML reference: HTML <body> tag


BR

BR Object

The BR object represents an HTML <br> element.

Access a BR Object

You can access a <br> element by using getElementById():

Example

var x = document.getElementById("myBR");
Try it Yourself »

Create a BR Object

You can create a <br> element by using the document.createElement() method:

Example

var x = document.createElement("BR");
Try it Yourself »

BR Object Properties

Property Description
clear Not supported in HTML5. Use style.clear instead.
Sets or returns the flow of text around floating objects

Standard Properties and Events

The BR object also supports the standard properties and events.

Related Pages

HTML reference: HTML <br> tag


Button

Button Object

The Button object represents an HTML <button> element.

Access a Button Object

You can access a <button> element by using getElementById():

Example

var x = document.getElementById("myBtn");
Try it Yourself »

Create a Button Object

You can create a <button> element by using the document.createElement() method:

Example

var x = document.createElement("BUTTON");
Try it Yourself »

Button Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Button object also supports the standard properties and events.

Related Pages

HTML reference: HTML <button> tag


Canvas

Canvas Object

The Canvas Object is new in HTML5.

The HTML5 <canvas> tag is used to draw graphics, on the fly, with JavaScript.

Access a Canvas Object

You can access a <canvas> element by using getElementById():

Example

var x = document.getElementById("myCanvas");
Try it Yourself »

Create a Canvas Object

You can create a <canvas> element by using the document.createElement() method:

Example

var x = document.createElement("CANVAS");
Try it Yourself »

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.

Colors, Styles, and Shadows

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

Line Styles

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

Rectangles

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

Paths

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

Transformations

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()

Text

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

Image Drawing

Method Description
drawImage() Draws an image, canvas, or video onto the canvas

Pixel Manipulation

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

Compositing

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

Other

Method Description
save() Saves the state of the current context
restore() Returns previously saved path state and attributes
createEvent()  
getContext()  
toDataURL()  

Standard Properties and Events

The canvas object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML5 Canvas

HTML reference: HTML <canvas> tag


Caption

Caption Object

The Caption object represents an HTML <caption> element.

Access a Caption Object

You can access a <caption> element by using getElementById():

Example

var x = document.getElementById("myCaption");

Try it Yourself »

Create a Caption Object

You can create a <caption> element by using the document.createElement() method:

Example

var x = document.createElement("CAPTION");
Try it Yourself »

Tip: You can also create a <caption> element by using the createCaption method of the Table object.

Caption Object Properties

Property Description
align Not supported in HTML5. Use style.textAlign or style.captionSide instead.
Sets or returns the alignment of the caption

Standard Properties and Events

The Caption object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Tables

HTML reference: HTML <caption> tag

JavaScript reference: HTML DOM Table Object


Cite

Cite Object

The Cite object represents an HTML <cite> element.

Access a Cite Object

You can access a <cite> element by using getElementById():

Example

var x = document.getElementById("myCite");
Try it Yourself »

Create a Cite Object

You can create a <cite> element by using the document.createElement() method:

Example

var x = document.createElement("CITE");
Try it Yourself »

Standard Properties and Events

The Cite object also supports the standard properties and events.

Related Pages

HTML reference: HTML <cite> tag


Code

Code Object

The Code object represents an HTML <code> element.

Access a Code Object

You can access a <code> element by using getElementById():

Example

var x = document.getElementById("myCode");
Try it Yourself »

Create a Code Object

You can create a <code> element by using the document.createElement() method:

Example

var x = document.createElement("CODE");
Try it Yourself »

Standard Properties and Events

The Code object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <code> tag


Column

Column Object

The Column object represents an HTML <col> element.

Access a Column Object

You can access a <col> element by using getElementById():

Example

var x = document.getElementById("myCol");
Try it Yourself »

Create a Column Object

You can create a <col> element by using the document.createElement() method:

var x = document.createElement("COL");

Column Object Properties

Property Description
span Sets or returns the value of the span attribute of a column

Standard Properties and Events

The Column object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML tables

HTML reference: HTML <col> tag

JavaScript reference: HTML DOM Columngroup Object


ColumnGroup

ColumnGroup Object

The ColumnGroup object represents an HTML <colgroup> element.

Access a ColumnGroup Object

You can access a <colgroup> element by using getElementById():

Example

var x = document.getElementById("myColgroup");
Try it Yourself »

Create a ColumnGroup Object

var x = document.createElement("COLGROUP");

ColumnGroup Object Properties

Property Description
span Sets or returns the value of the span attribute of a column group

Standard Properties and Events

The ColumnGroup object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML tables

HTML reference: HTML <colgroup> tag

JavaScript reference: HTML DOM Column Object


Datalist

Datalist 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.

Access a Datalist Object

You can access a <datalist> element by using getElementById():

Example

var x = document.getElementById("myDatalist");
Try it Yourself »

Create a Datalist Object

You can create a <datalist> element by using the document.createElement() method:

Example

var x = document.createElement("DATALIST");
Try it Yourself »

Datalist Object Collections

Collection Description
options Returns a collection of all the options in a datalist

Standard Properties and Events

The Datalist object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <datalist> tag


DD

DD Object

The DD object represents an HTML <dd> element.

Access a DD Object

You can access a <dd> element by using getElementById():

Example

var x = document.getElementById("myDD");
Try it Yourself »

Create a DD Object

You can create a <dd> element by using the document.createElement() method:

Example

var x = document.createElement("DD");
Try it Yourself »

Standard Properties and Events

The DD object also supports the standard properties and events.

Related Pages

HTML reference: HTML <dd> tag


Del

Del Object

The Del object represents an HTML <del> element.

Access a Del Object

You can access a <del> element by using getElementById():

Example

var x = document.getElementById("myDel");
Try it Yourself »

Create a Del Object

You can create a <del> element by using the document.createElement() method:

Example

var x = document.createElement("DEL");
Try it Yourself »

Del Object Properties

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

Standard Properties and Events

The Del object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting

HTML reference: HTML <del> tag

JavaScript reference: HTML DOM ins Object


Details

Details Object

The Details object represents an HTML <details> element.

Note: The <details> element is not supported in Internet Explorer.

Access a Details Object

You can access a <details> element by using getElementById():

Example

var x = document.getElementById("myDetails");
Try it Yourself »

Create a Details Object

You can create a <details> element by using the document.createElement() method:

Example

var x = document.createElement("DETAILS");
Try it Yourself »

Details Object Properties

Property Description
open Sets or returns whether the details should be visible (open) to the user, or not

Standard Properties and Events

The Details object also supports the standard properties and events.

Related Pages

HTML reference: HTML <details> tag

HTML reference: HTML <summary> tag

JavaScript reference: HTML DOM Details Object


DFN

DFN Object

The DFN object represents an HTML <dfn> element.

Access a DFN Object

You can access a <dfn> element by using getElementById():

Example

var x = document.getElementById("myDFN");
Try it Yourself »

Create a DFN Object

You can create a <dfn> element by using the document.createElement() method:

Example

var x = document.createElement("DFN");
Try it Yourself »

Standard Properties and Events

The DFN object also supports the standard properties and events.

Related Pages

HTML reference: HTML <dfn> tag


Dialog

Dialog Object

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+.

Access a Dialog Object

You can access a <dialog> element by using getElementById():

Example

var x = document.getElementById("myDialog");
Try it Yourself »

Create a Dialog Object

You can create a <dialog> element by using the document.createElement() method:

Example

var x = document.createElement("DIALOG");
Try it Yourself »

Dialog Object Properties

Property Description
open Sets or returns whether a dialog should be open or not
returnValue Sets or returns the dialog's return value

Dialog Object Methods

Method Description
close() Closes the dialog
show() Shows the dialog
showModal() Shows the dialog and makes it the top-most modal dialog

Standard Properties and Events

The Dialog object also supports the standard properties and events.

Related Pages

HTML reference: HTML <dialog> tag


Div

Div Object

The Div object represents an HTML <div> element.

Access a Div Object

You can access a <div> element by using getElementById():

Example

var x = document.getElementById("myDIV");
Try it Yourself »

Create a Div Object

You can create a <div> element by using the document.createElement() method:

Example

var x = document.createElement("DIV");
Try it Yourself »

Div Object Properties

Property Description
align Not supported in HTML5. Use style.textAlign instead.
Sets or returns the value of the align attribute of the <div> element

Standard Properties and Events

The Div object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Blocks

HTML reference: HTML <div> tag


DList

DList Object

The DList object represents an HTML <dl> element.

Access a DList Object

You can access a <dl> element by using getElementById():

Example

var x = document.getElementById("myDL");
Try it Yourself »

Create a DList Object

You can create a <dl> element by using the document.createElement() method:

Example

var x = document.createElement("DL");
Try it Yourself »

Standard Properties and Events

The DList object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Lists

HTML reference: HTML <dl> tag


DT

DT Object

The DT object represents an HTML <dt> element.

Access a DT Object

You can access a <dt> element by using getElementById():

Example

var x = document.getElementById("myDT");
Try it Yourself »

Create a DT Object

You can create a <dt> element by using the document.createElement() method:

Example

var x = document.createElement("DT");
Try it Yourself »

Standard Properties and Events

The DT object also supports the standard properties and events.

Related Pages

HTML reference: HTML <dt> tag


Emphasized

Emphasized Object

The Emphasized object represents an HTML <em> element.

Access an Emphasized Object

You can access an <em> element by using getElementById():

Example

var x = document.getElementById("myEm");
Try it Yourself »

Create an Emphasized Object

You can create an <em> element by using the document.createElement() method:

Example

var x = document.createElement("EM");
Try it Yourself »

Standard Properties and Events

The Emphasized object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <em> tag

JavaScript reference: HTML DOM Italic Object


Embed

Embed Object

The Embed Object is new in HTML5.

The Embed object represents an HTML <embed> element.

Access an Embed Object

You can access an <embed> element by using getElementById():

Example

var x = document.getElementById("myEmbed");
Try it Yourself »

Create an Embed Object

You can create an <embed> element by using the document.createElement() method:

Example

var x = document.createElement("EMBED");
Try it Yourself »

Embed Object Properties

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

Standard Properties and Events

The Embed object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Plug-ins

HTML reference: HTML <embed> tag


Fieldset

Fieldset Object

The Fieldset object represents an HTML <fieldset> element.

Access a Fieldset Object

You can access a <fieldset> element by using getElementById():

Example

var x = document.getElementById("myFieldset");
Try it Yourself »

Tip: You can also access a Fieldset object by searching through the elements collection of a form.

Create a Fieldset Object

You can create a <fieldset> element by using the document.createElement() method:

Example

var x = document.createElement("FIELDSET");
Try it Yourself »

Fieldset Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Fieldset object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <fieldset> tag


Figcaption

Figcaption Object

The Figcaption Object is new in HTML5.

The Figcaption object represents an HTML <figcaption> element.

Access a Figcaption Object

You can access a <figcaption> element by using getElementById():

Example

var x = document.getElementById("myFigCap");
Try it Yourself »

Create a Figcaption Object

You can create a <figcaption> element by using the document.createElement() method:

Example

var x = document.createElement("FIGCAPTION");
Try it Yourself »

Standard Properties and Events

The Figcaption object also supports the standard properties and events.

Related Pages

HTML reference: HTML <figcaption> tag


Figure

Figure Object

The Figure Object is new in HTML5.

The Figure object represents an HTML <figure> element.

Access a Figure Object

You can access a <figure> element by using getElementById():

Example

var x = document.getElementById("myFigure");
Try it Yourself »

Create a Figure Object

You can create a <figure> element by using the document.createElement() method:

Example

var x = document.createElement("FIGURE");
Try it Yourself »

Standard Properties and Events

The Figure object also supports the standard properties and events.

Related Pages

HTML reference: HTML <figure> tag


Footer

Footer Object

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.

Access a Footer Object

You can access a <footer> element by using getElementById():

Example

var x = document.getElementById("myFooter");
Try it Yourself »

Create a Footer Object

You can create a <footer> element by using the document.createElement() method:

Example

var x = document.createElement("FOOTER");
Try it Yourself »

Standard Properties and Events

The Footer object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML5 Semantic Elements

HTML reference: HTML <footer> tag

JavaScript reference: HTML DOM Header Object


Form

Form Object

The Form object represents an HTML <form> element.

Access a Form Object

You can access a <form> element by using getElementById():

Example

var x = document.getElementById("myForm");
Try it Yourself »

Tip: You can also access a <form> element by using the forms collection.

Create a Form Object

You can create a <form> element by using the document.createElement() method:

Example

var x = document.createElement("FORM");
Try it Yourself »

Form Object Collections

Collection Description
elements Returns a collection of all elements in a form

Form Object Properties

= Property added in HTML5.

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

Form Object Methods

Method Description
reset() Resets a form
submit() Submits a form

Standard Properties and Events

The Form object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

JavaScript tutorial: JS Forms/Validation

HTML reference: HTML <form> tag


Head

Head Object

The Head object represents an HTML <head> element.

Access a Head Object

You can access a <head> element by using getElementsByTagName():

var x = document.getElementsByTagName("HEAD")[0];

Create a Head Object

You can create a <head> element by using the document.createElement() method:

var x = document.createElement("HEAD");

Standard Properties and Events

The Head object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Head

HTML reference: HTML <head> tag


Header

Header Object

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.

Access a Header Object

You can access a <header> element by using getElementById():

Example

var x = document.getElementById("myHeader");
Try it Yourself »

Create a Header Object

You can create a <header> element by using the document.createElement() method:

Example

var x = document.createElement("HEADER");
Try it Yourself »

Standard Properties and Events

The Header object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML5 Semantic Elements

HTML reference: HTML <header> tag

JavaScript reference: HTML DOM Footer Object


Heading

Heading Object

The Heading object represents an HTML heading element: <h1> to <h6>.

Access a Heading Object

You can access a heading element by using getElementById():

Example

var x = document.getElementById("myHeading");
Try it Yourself »

Create a Heading Object

You can create a heading element by using the document.createElement() method:

Example

var x = document.createElement("H1");
Try it Yourself »

Heading Object Properties

Property Description
align Not supported in HTML5. Use style.textAlign instead.
Sets or returns the value of the align attribute of the heading element

Standard Properties and Events

The Heading object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Headings

HTML reference: HTML <h1> to <h6> Tags


HR

HR Object

The HR object represents an HTML <hr> element.

Access a HR Object

You can access a <hr> element by using getElementById():

Example

var x = document.getElementById("myHR");
Try it Yourself »

Create a HR Object

You can create a <hr> element by using the document.createElement() method:

Example

var x = document.createElement("HR");
Try it Yourself »

HR Object Properties

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

Standard Properties and Events

The HR object also supports the standard properties and events.

Related Pages

HTML reference: HTML <hr> tag


HTML

HTML Object

The HTML object represents an HTML <html> element.

Access a HTML Object

You can access the <html> element by using getElementsByTagName():

Example

var x = document.getElementsByTagName("HTML")[0];
Try it Yourself »

Tip: You can also access the <html> element by using the document.documentElement property.

Standard Properties and Events

The HTML object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Introduction

HTML reference: HTML <html> tag


Italic

Italic Object

The Italic object represents an HTML <i> element.

Access an Italic Object

You can access an <i> element by using getElementById():

Example

var x = document.getElementById("myItalic");
Try it Yourself »

Create an Italic Object

You can create an <i> element by using the document.createElement() method:

Example

var x = document.createElement("I");
Try it Yourself »

Standard Properties and Events

The Italic object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <i> tag

JavaScript reference: HTML DOM Emphasized Object


IFrame

IFrame Object

The IFrame object represents an HTML <iframe> element.

Access an IFrame Object

You can access an <iframe> element by using getElementById():

Example

var x = document.getElementById("myFrame");
Try it Yourself »

Tip: You can also access an <iframe> element by using the window.frames property.

Create an IFrame Object

You can create an <iframe> element by using the document.createElement() method:

Example

var x = document.createElement("IFRAME");
Try it Yourself »

IFrame Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The IFrame object also supports the standard properties and events.

Related Pages

HTML reference: HTML <iframe> tag


Image

Image Object

The Image object represents an HTML <img> element.

Access an Image Object

You can access an <img> element by using getElementById():

Example

var x = document.getElementById("myImg");
Try it Yourself »

Tip: You can also access an <img> element by using the images collection.

Create an Image Object

You can create an <img> element by using the document.createElement() method:

Example

var x = document.createElement("IMG");
Try it Yourself »

Image Object Properties

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

Standard Properties and Events

The Image object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Images

HTML reference: HTML <img> tag


Ins

Ins Object

The Ins object represents an HTML <ins> element.

Access an Ins Object

You can access an <ins> element by using getElementById():

Example

var x = document.getElementById("myIns");
Try it Yourself »

Create an Ins Object

You can create an <ins> element by using the document.createElement() method:

Example

var x = document.createElement("INS");
Try it Yourself »

Ins Object Properties

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

Standard Properties and Events

The Ins object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting

HTML reference: HTML <ins> tag

JavaScript reference: HTML DOM del Object


Input Button

Input Button Object

The Input Button object represents an HTML <input> element with type="button".

Access an Input Button Object

You can access an <input> element with type="button" by using getElementById():

Example

var x = document.getElementById("myBtn");
Try it Yourself »

Tip: You can also access <input type="button"> by searching through the elements collection of a form.

Create an Input Button Object

You can create an <input> element with type="button" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "button");
Try it Yourself »

Input Button Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Button object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Checkbox

Input Checkbox Object

The Input Checkbox object represents an HTML <input> element with type="checkbox".

Access an Input Checkbox Object

You can access an <input> element with type="checkbox" by using getElementById():

Example

var x = document.getElementById("myCheck");
Try it Yourself »

Tip: You can also access <input type="checkbox"> by searching through the elements collection of a form.

Create an Input Checkbox Object

You can create an <input> element with type="checkbox" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "checkbox");
Try it Yourself »

Input Checkbox Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Checkbox object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Color

Input Color Object

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.

Access an Input Color Object

You can access an <input> element with type="color" by using getElementById():

Example

var x = document.getElementById("myColor");
Try it Yourself »

Tip: You can also access <input type="color"> by searching through the elements collection of a form.

Create an Input Color Object

You can create an <input> element with type="color" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "color");
Try it Yourself »

Input Color Object Properties

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

Standard Properties and Events

The Input Color object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Date

Input Date Object

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.

Access an Input Date Object

You can access an <input> element with type="date" by using getElementById():

Example

var x = document.getElementById("myDate");
Try it Yourself »

Tip: You can also access <input type="date"> by searching through the elements collection of a form.

Create an Input Date Object

You can create an <input> element with type="date" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "date");
Try it Yourself »

Input Date Object Properties

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

Input Date Object Methods

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

Standard Properties and Events

The Input Date object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Datetime

Input Datetime Object

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.

Access an Input Datetime Object

You can access an <input> element with type="datetime" by using getElementById():

Example

var x = document.getElementById("myDatetime");
Try it Yourself »

Tip: You can also access <input type="datetime"> by searching through the elements collection of a form.

Create an Input Datetime Object

You can create an <input> element with type="datetime" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "datetime");
Try it Yourself »

Input Datetime Object Properties

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

Input Datetime Object Methods

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

Standard Properties and Events

The Input Datetime object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input DatetimeLocal

Input DatetimeLocal Object

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.

Access an Input DatetimeLocal Object

You can access an <input> element with type="datetime-local" by using getElementById():

Example

var x = document.getElementById("myLocalDate");
Try it Yourself »

Tip: You can also access <input type="datetime-local"> by searching through the elements collection of a form.

Create an Input DatetimeLocal Object

You can create an <input> element with type="datetime-local" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "datetime-local");
Try it Yourself »

Input DatetimeLocal Object Properties

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

Input DatetimeLocal Object Methods

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

Standard Properties and Events

The Input DatetimeLocal object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Email

Input Email Object

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.

Access an Input Email Object

You can access an <input> element with type="email" by using getElementById():

Example

var x = document.getElementById("myEmail");
Try it Yourself »

Tip: You can also access <input type="email"> by searching through the elements collection of a form.

Create an Input Email Object

You can create an <input> element with type="email" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "email");
Try it Yourself »

Input Email Object Properties

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

Standard Properties and Events

The Input Email object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input FileUpload

Input FileUpload Object

The Input FileUpload object represents an HTML <input> element with type="file".

Access an Input FileUpload Object

You can access an <input> element with type="file" by using getElementById():

Example

var x = document.getElementById("myFile");
Try it Yourself »

Tip: You can also access <input type="file"> by searching through the elements collection of a form.

Create an Input FileUpload Object

You can create an <input> element with type="file" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "file");
Try it Yourself »

Input FileUpload Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input FileUpload object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Hidden

Input Hidden Object

The Input Hidden object represents an HTML <input> element with type="hidden".

Access an Input Hidden Object

You can access an <input> element with type="hidden" by using getElementById():

Example

var x = document.getElementById("myInput");
Try it Yourself »

Tip: You can also access <input type="hidden"> by searching through the elements collection of a form.

Create an Input Hidden Object

You can create an <input> element with type="hidden" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "hidden");
Try it Yourself »

Input Hidden Object Properties

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

Standard Properties and Events

The Input Hidden object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Image

Input Image Object

The Input Image object represents an HTML <input> element with type="image".

Access an Input Image Object

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.

Create an Input Image Object

You can create an <input> element with type="image" by using the document.createElement() method:

var x = document.createElement("INPUT");
x.setAttribute("type", "image");

Input Image Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Image object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Month

Input Month Object

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.

Access an Input Month Object

You can access an <input> element with type="month" by using getElementById():

Example

var x = document.getElementById("myMonth");
Try it Yourself »

Tip: You can also access <input type="month"> by searching through the elements collection of a form.

Create an Input Month Object

You can create an <input> element with type="month" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "month");
Try it Yourself »

Input Month Object Properties

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

Input Month Object Methods

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

Standard Properties and Events

The Input Month object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Number

Input Number Object

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.

Access an Input Number Object

You can access an <input> element with type="number" by using getElementById():

Example

var x = document.getElementById("myNumber");
Try it Yourself »

Tip: You can also access <input type="number"> by searching through the elements collection of a form.

Create an Input Number Object

You can create an <input> element with type="number" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "number");
Try it Yourself »

Input Number Object Properties

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

Input Number Object Methods

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

Standard Properties and Events

The Input Number object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Password

Input Password Object

The Input Password object represents an HTML <input> element with type="password".

Access an Input Password Object

You can access an <input> element with type="password" by using getElementById():

Example

var x = document.getElementById("myPsw");
Try it Yourself »

Tip: You can also access <input type="password"> by searching through the elements collection of a form.

Create an Input Password Object

You can create an <input> element with type="password" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "password");
Try it Yourself »

Input Password Object Properties

= Property added in HTML5.

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

Input Password Object Methods

Method Description
select() Selects the content of a password field

Standard Properties and Events

The Input Password object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Radio

Input Radio Object

The Input Radio object represents an HTML <input> element with type="radio".

Access an Input Radio Object

You can access an <input> element with type="radio" by using getElementById():

Example

var x = document.getElementById("myRadio");
Try it Yourself »

Tip: You can also access <input type="radio"> by searching through the elements collection of a form.

Create an Input Radio Object

You can create an <input> element with type="radio" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "radio");
Try it Yourself »

Input Radio Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Radio object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Range

Input Range Object

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.

Access an Input Range Object

You can access an <input> element with type="range" by using getElementById():

Example

var x = document.getElementById("myRange");
Try it Yourself »

Tip: You can also access <input type="range"> by searching through the elements collection of a form.

Create an Input Range Object

You can create an <input> element with type="range" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "range");
Try it Yourself »

Input Range Object Properties

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

Input Range Object Methods

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

Standard Properties and Events

The Input Range object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Reset

Input Reset Object

The Input Reset object represents an HTML <input> element with type="reset".

Access an Input Reset Object

You can access an <input> element with type="reset" by using getElementById():

Example

var x = document.getElementById("myReset");
Try it Yourself »

Tip: You can also access <input type="reset"> by searching through the elements collection of a form.

Create an Input Reset Object

You can create an <input> element with type="reset" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "reset");
Try it Yourself »

Input Reset Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Reset object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Search

Input Search Object

The Input Search Object is new in HTML5.

The Input Search object represents an HTML <input> element with type="search".

Access an Input Search Object

You can access an <input> element with type="search" by using getElementById():

Example

var x = document.getElementById("mySearch");
Try it Yourself »

Tip: You can also access <input type="search"> by searching through the elements collection of a form.

Create an Input Search Object

You can create an <input> element with type="search" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "search");
Try it Yourself »

Input Search Object Properties

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

Standard Properties and Events

The Input Search object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Submit

Input Submit Object

The Input Submit object represents an HTML <input> element with type="submit".

Access an Input Submit Object

You can access an <input> element with type="submit" by using getElementById():

Example

var x = document.getElementById("mySubmit");
Try it Yourself »

Tip: You can also access <input type="submit"> by searching through the elements collection of a form.

Create an Input Submit Object

You can create an <input> element with type="submit" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "submit");
Try it Yourself »

Input Submit Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Submit object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Text

Input Text Object

The Input Text object represents an HTML <input> element with type="text".

Access an Input Text Object

You can access an <input> element with type="text" by using getElementById():

Example

var x = document.getElementById("myText");
Try it Yourself »

Tip: You can also access <input type="text"> by searching through the elements collection of a form.

Create an Input Text Object

You can create an <input> element with type="text" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "text");
Try it Yourself »

Input Text Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Input Text object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Time

Input Time Object

The Input Time Object is new in HTML5.

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.

Access an Input Time Object

You can access an <input> element with type="time" by using getElementById():

Example

var x = document.getElementById("myTime");
Try it Yourself »

Tip: You can also access <input type="time"> by searching through the elements collection of a form.

Create an Input Time Object

You can create an <input> element with type="time" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "time");
Try it Yourself »

Input Time Object Properties

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

Input Time Object Methods

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

Standard Properties and Events

The Input Time object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input URL

Input URL Object

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.

Access an Input URL Object

You can access an <input> element with type="url" by using getElementById():

Example

var x = document.getElementById("myUrl");
Try it Yourself »

Tip: You can also access <input type="url"> by searching through the elements collection of a form.

Create an Input URL Object

You can create an <input> element with type="url" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "url");
Try it Yourself »

Input URL Object Properties

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

Standard Properties and Events

The Input URL object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Input Week

Input Week Object

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.

Access an Input Week Object

You can access an <input> element with type="week" by using getElementById():

Example

var x = document.getElementById("myWeek");
Try it Yourself »

Tip: You can also access <input type="week"> by searching through the elements collection of a form.

Create an Input Week Object

You can create an <input> element with type="week" by using the document.createElement() method:

Example

var x = document.createElement("INPUT");
x.setAttribute("type", "week");
Try it Yourself »

Input Week Object Properties

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

Input Week Object Methods

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

Standard Properties and Events

The Input Week object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute


Kbd

Kbd Object

The Kbd object represents an HTML <kbd> element.

Access a Kbd Object

You can access a <kbd> element by using getElementById():

Example

var x = document.getElementById("myKbd");
Try it Yourself »

Create a Kbd Object

You can create a <kbd> element by using the document.createElement() method:

Example

var x = document.createElement("KBD");
Try it Yourself »

Standard Properties and Events

The Kbd object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <kbd> tag


Label

Label Object

The Label object represents an HTML <label> element.

Access a Label Object

You can access a <label> element by using getElementById():

Example

var x = document.getElementById("myLabel");
Try it Yourself »

Create a Label Object

You can create a <label> element by using the document.createElement() method:

Example

var x = document.createElement("LABEL");
Try it Yourself »

Label Object Properties

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

Standard Properties and Events

The Label object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <label> tag


Legend

Legend Object

The Legend object represents an HTML <legend> element.

Access a Legend Object

You can access a <legend> element by using getElementById():

Example

var x = document.getElementById("myLegend");
Try it Yourself »

Create a Legend Object

You can create a <legend> element by using the document.createElement() method:

Example

var x = document.createElement("LEGEND");
Try it Yourself »

Legend Object Properties

Property Description
form Returns a reference to the form that contains the legend

Standard Properties and Events

The Legend object also supports the standard properties and events.

Related Pages

HTML reference: HTML <fieldset> tag

HTML reference: HTML <legend> tag


Li

Li Object

The Li object represents an HTML <li> element.

Access a Li Object

You can access a <li> element by using getElementById():

Example

var x = document.getElementById("myLi");
Try it Yourself »

Create a Li Object

You can create a <li> element by using the document.createElement() method:

Example

var x = document.createElement("LI");
Try it Yourself »

Li Object Properties

Property Description
value Sets or returns the value of the value attribute of a list item

Standard Properties and Events

The Li object also supports the standard properties and events.

Related Pages

HTML reference: HTML <li> tag


Link

Link Object

The Link object represents an HTML <link> element.

Access a Link Object

You can access a <link> element by using getElementById():

Example

var x = document.getElementById("myLink");
Try it Yourself »

Create a Link Object

You can create a <link> element by using the document.createElement() method:

Example

var x = document.createElement("LINK");
Try it Yourself »

Link Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Link object also supports the standard properties and events.

Related Pages

HTML reference: HTML <link> tag


Map

Map Object

The Map object represents an HTML <map> element.

Access a Map Object

You can access a <map> element by using getElementById():

Example

var x = document.getElementById("myMap");
Try it Yourself »

Create a Map Object

You can create a <map> element by using the document.createElement() method:

Example

var x = document.createElement("MAP");
Try it Yourself »

Map Object Collections

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

Map Object Properties

Property Description
name Sets or returns the value of the name attribute of an image-map

Standard Properties and Events

The Map object also supports the standard properties and events.

Related Pages

HTML DOM reference: Area object

HTML reference: HTML <map> tag

HTML reference: HTML <area> tag


Mark

Mark Object

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.

Access a Mark Object

You can access a <mark> element by using getElementById():

Example

var x = document.getElementById("myMark");
Try it Yourself »

Create a Mark Object

You can create a <mark> element by using the document.createElement() method:

Example

var x = document.createElement("MARK");
Try it Yourself »

Standard Properties and Events

The Mark object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <mark> tag


Menu

Menu Object

The Menu object represents an HTML <menu> element.

Note: The <menu> element is currently NOT supported in any of the major browsers.

Access a Menu Object

You can access a <menu> element by using getElementById():

var x = document.getElementById("myMenu");

Create a Menu Object

You can create a <menu> element by using the document.createElement() method:

var x = document.createElement("MENU");

Menu Object Properties

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

Standard Properties and Events

The Menu object also supports the standard properties and events.

Related Pages

HTML reference: HTML <menu> tag


MenuItem

MenuItem Object

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.

Access a MenuItem Object

You can access a <menuitem> element by using getElementById():

var x = document.getElementById("myMenuItem");

Create a MenuItem Object

You can create a <menuitem> element by using the document.createElement() method:

var x = document.createElement("MENUITEM");

MenuItem Object Properties

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

Standard Properties and Events

The MenuItem object also supports the standard properties and events.

Related Pages

HTML reference: HTML <menuitem> tag


Meta

Meta Object

The Meta object represents an HTML <meta> element.

Access a Meta Object

You can access a <meta> element by using getElementsByTagName():

var x = document.getElementsByTagName("META")[0];
Try it Yourself »

Create a Meta Object

You can create a <meta> element by using the document.createElement() method:

Example

var x = document.createElement("META");
Try it Yourself »

Meta Object Properties

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

Standard Properties and Events

The Meta object also supports the standard properties and events.

Related Pages

HTML reference: HTML <meta> tag


Meter

Meter Object

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).

Access a Meter Object

You can access a <meter> element by using getElementById():

Example

var x = document.getElementById("myMeter");
Try it Yourself »

Create a Meter Object

You can create a <meter> element by using the document.createElement() method:

Example

var x = document.createElement("METER");
Try it Yourself »

Meter Object Properties

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

Standard Properties and Events

The Meter object also supports the standard properties and events.

Related Pages

HTML reference: HTML <meter> tag


Nav

Nav Object

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.

Access a Nav Object

You can access a <nav> element by using getElementById():

Example

var x = document.getElementById("myNav");
Try it Yourself »

Create a Nav Object

You can create a <nav> element by using the document.createElement() method:

Example

var x = document.createElement("NAV");
Try it Yourself »

Standard Properties and Events

The Nav object supports the standard properties and events.

Related Pages

HTML reference: HTML <nav> tag


Object

Object Object

The Object object represents an HTML <object> element.

Access an Object Object

You can access an <object> element by using getElementById():

Example

var x = document.getElementById("myObject");
Try it Yourself »

Create an Object Object

You can create an <object> element by using the document.createElement() method:

Example

var x = document.createElement("OBJECT");
Try it Yourself »

Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Object object also supports the standard properties and events.

Related Pages

HTML reference: HTML <object> tag


Ol

Ol Object

The Ol object represents an HTML <ol> element.

Access an Ol Object

You can access an <ol> element by using getElementById():

Example

var x = document.getElementById("myOl");
Try it Yourself »

Create an Ol Object

You can create an <ol> element by using the document.createElement() method:

Example

var x = document.createElement("OL");
Try it Yourself »

Ol Object Properties

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

Standard Properties and Events

The Ol object also supports the standard properties and events.

Related Pages

HTML reference: HTML <ol> tag


OptionGroup

OptionGroup Object

The OptionGroup object represents an HTML <optgroup> element.

Access an OptionGroup Object

You can access an <optgroup> element by using getElementById():

Example

var x = document.getElementById("myOptgroup");
Try it Yourself »

Create an OptionGroup Object

You can create an <optgroup> element by using the document.createElement() method:

Example

var x = document.createElement("OPTGROUP");
Try it Yourself »

OptionGroup Object Properties

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

Standard Properties and Events

The OptionGroup object also supports the standard properties and events.

Related Pages

HTML reference: HTML <optgroup> tag


Option

Option Object

The Option object represents an HTML <option> element.

Access an Option Object

You can access an <option> element by using getElementById():

Example

var x = document.getElementById("myOption");
Try it Yourself »

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.

Create an Option Object

You can create an <option> element by using the document.createElement() method:

Example

var x = document.createElement("OPTION");
Try it Yourself »

Option Object Properties

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

Standard Properties and Events

The Option object also supports the standard properties and events.

Related Pages

HTML reference: HTML <option> tag


Output

Output Object

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.

Access an Output Object

You can access an <output> element by using getElementById():

Example

var x = document.getElementById("myOutput");
Try it Yourself »

Tip: You can also access an <output> element by searching through the elements collection of a form.

Create an Output Object

You can create an <output> element by using the document.createElement() method:

Example

var x = document.createElement("OUTPUT");
Try it Yourself »

Output Object Properties

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

Standard Properties and Events

The Output object also supports the standard properties and events.

Related Pages

HTML reference: HTML <output> tag


Paragraph

Paragraph Object

The Paragraph object represents an HTML <p> element.

Access a Paragraph Object

You can access a <p> element by using getElementById():

Example

var x = document.getElementById("myP");
Try it Yourself »

Create a Paragraph Object

You can create a <p> element by using the document.createElement() method:

Example

var x = document.createElement("P");
Try it Yourself »

Paragraph Object Properties

Property Description
align Not supported in HTML5. Use style.textAlign instead.
Sets or returns the value of the align attribute of the paragraph

Standard Properties and Events

The Paragraph object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Paragraphs

HTML reference: HTML <p> tag


Parameter

Parameter Object

The Parameter object represents an HTML <param> element.

The <param> element is used to define parameters for plugins embedded with an <object> element.

Access a Parameter Object

You can access a <param> element by using getElementById():

Example

var x = document.getElementById("myParam");
Try it Yourself »

Create a Parameter Object

You can create a <param> element by using the document.createElement() method:

Example

var x = document.createElement("PARAM");
Try it Yourself »

Parameter Object Properties

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

Standard Properties and Events

The Parameter object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Plug-ins

HTML reference: HTML <param> tag

HTML reference: HTML <object> tag


Pre

Pre Object

The Pre object represents an HTML <pre> element.

Access a Pre Object

You can access a <pre> element by using getElementById():

Example

var x = document.getElementById("myPre");
Try it Yourself »

Create a Pre Object

You can create a <pre> element by using the document.createElement() method:

Example

var x = document.createElement("PRE");
Try it Yourself »

Pre Object Properties

Property Description
width Not supported in HTML5. Use style.width instead.
Sets or returns the value of the width attribute of the preformatted text

Standard Properties and Events

The Pre object also supports the standard properties and events.

Related Pages

HTML Tutorial: HTML Text Formatting

HTML Reference: HTML <pre> tag


Progress

Progress Object

The Progress Object is new in HTML5.

The Progress object represents an HTML <progress> element.

The <progress> element represents the progress of a task.

Access a Progress Object

You can access a <progress> element by using getElementById():

Example

var x = document.getElementById("myProgress");
Try it Yourself »

Create a Progress Object

You can create a <progress> element by using the document.createElement() method:

Example

var x = document.createElement("PROGRESS");
Try it Yourself »

Progress Object Properties

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

Standard Properties and Events

The Progress object also supports the standard properties and events.

Related Pages

HTML reference: HTML <progress> tag


Quote

Quote Object

The Quote object represents an HTML <q> element.

Access a Quote Object

You can access a <q> element by using getElementById():

Example

var x = document.getElementById("myQuote");
Try it Yourself »

Create a Quote Object

You can create a <q> element by using the document.createElement() method:

Example

var x = document.createElement("Q");
Try it Yourself »

Quote Object Properties

Property Description
cite Sets or returns the value of the cite attribute of a quotation

Standard Properties and Events

The Quote object also supports the standard properties and events.

Related Pages

HTML reference: HTML <q> tag

JavaScript reference: HTML DOM Blockquote Object


S

S Object

The S object represents an HTML <s> element.

Access a S Object

You can access a <s> element by using getElementById():

Example

var x = document.getElementById("myS");
Try it Yourself »

Create a S Object

You can create a <s> element by using the document.createElement() method:

Example

var x = document.createElement("S");
Try it Yourself »

Standard Properties and Events

The S object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting

HTML reference: HTML <s> tag

JavaScript reference: HTML DOM Del Object


Samp

Samp Object

The Samp object represents an HTML <samp> element.

Access a Samp Object

You can access a <samp> element by using getElementById():

Example

var x = document.getElementById("mySamp");
Try it Yourself »

Create a Samp Object

You can create a <samp> element by using the document.createElement() method:

Example

var x = document.createElement("SAMP");
Try it Yourself »

Standard Properties and Events

The Samp object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <samp> tag


Script

Script Object

The Script object represents an HTML <script> element.

Access a Script Object

You can access a <script> element by using getElementById():

Example

var x = document.getElementById("myScript");
Try it Yourself »

Tip: You can also access a <script> element by using the scripts collection.

Create a Script Object

You can create a <script> element by using the document.createElement() method:

Example

var x = document.createElement("SCRIPT");
Try it Yourself »

Script Object Properties

= Property added in HTML5.

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

Standard Properties and Events

The Script object also supports the standard properties and events.

Related Pages

HTML reference: HTML <script> tag


Section

Section Object

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.

Access a Section Object

You can access a <section> element by using getElementById():

Example

var x = document.getElementById("mySection");
Try it Yourself »

Create a Section Object

You can create a <section> element by using the document.createElement() method:

Example

var x = document.createElement("SECTION");
Try it Yourself »

Standard Properties and Events

The Section object supports the standard properties and events.

Related Pages

HTML reference: HTML <section> tag


Select

Select Object

The Select object represents an HTML <select> element.

Access a Select Object

You can access a <select> element by using getElementById():

Example

var x = document.getElementById("mySelect");
Try it Yourself »

Tip: You can also access a Select object by searching through the elements collection of a form.

Create a Select Object

You can create a <select> element by using the document.createElement() method:

Example

var x = document.createElement("SELECT");
Try it Yourself »

Select Object Collections

Collection Description
options Returns a collection of all the options in a drop-down list

Select Object Properties

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

Select Object Methods

Method Description
add() Adds an option to a drop-down list
remove() Removes an option from a drop-down list

Standard Properties and Events

The Select object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <select> tag


Small

Small Object

The Small object represents an HTML <small> element.

Access a Small Object

You can access a <small> element by using getElementById():

Example

var x = document.getElementById("mySmall");
Try it Yourself »

Create a Small Object

You can create a <small> element by using the document.createElement() method:

Example

var x = document.createElement("SMALL");
Try it Yourself »

Standard Properties and Events

The Small object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <small> tag


Source

Source Object

The Source Object is new in HTML5.

The Source object represents an HTML <source> element.

Access a Source Object

You can access a <source> element by using getElementById():

Example

var x = document.getElementById("mySource");
Try it Yourself »

Create a Source Object

You can create a <source> element by using the document.createElement() method:

Example

var x = document.createElement("SOURCE");
Try it Yourself »

Source Object Properties

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

Standard Properties and Events

The Source object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML5 Video

HTML tutorial: HTML5 Audio

HTML reference: HTML <source> tag


Span

Span Object

The Span object represents an HTML <span> element.

Access a Span Object

You can access a <span> element by using getElementById():

Example

var x = document.getElementById("mySpan");
Try it Yourself »

Create a Span Object

You can create a <span> element by using the document.createElement() method:

Example

var x = document.createElement("SPAN");
Try it Yourself »

Standard Properties and Events

The Span object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Blocks

HTML reference: HTML <span> tag


Strong

Strong Object

The Strong object represents an HTML <strong> element.

Access a Strong Object

You can access a <strong> element by using getElementById():

Example

var x = document.getElementById("myStrong");
Try it Yourself »

Create a Strong Object

You can create a <strong> element by using the document.createElement() method:

Example

var x = document.createElement("STRONG");
Try it Yourself »

Standard Properties and Events

The Strong object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <strong> tag

JavaScript reference: HTML DOM Bold Object


Style

Style object

The Style object represents an individual style statement.

Style Object Properties

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
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

Access a Style Object

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:

Example

var x = document.getElementsByTagName("STYLE");
Try it Yourself »

Accessing a specified element's style object:

Example

var x = document.getElementById("myH1").style;
Try it Yourself »

Create a Style Object

You can create a <style> element by using the document.createElement() method:

Example

var x = document.createElement("STYLE");
Try it Yourself »

You can also set the style properties of an existing element:

Example

document.getElementById("myH1").style.color = "red";
Try it Yourself »

Related Pages

HTML tutorial: HTML CSS

CSS tutorial: CSS Tutorial

HTML reference: HTML <style> tag

CSS reference: CSS Properties

Subscript

Subscript Object

The Subscript object represents an HTML <sub> element.

Access a Subscript Object

You can access a <sub> element by using getElementById():

Example

var x = document.getElementById("mySub");
Try it Yourself »

Create a Subscript Object

You can create a <sub> element by using the document.createElement() method:

Example

var x = document.createElement("SUB");
Try it Yourself »

Standard Properties and Events

The Subscript object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <sub> tag

JavaScript reference: HTML DOM Superscript Object


Summary

Summary 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+.

Access a Summary Object

You can access a <summary> element by using getElementById():

Example

var x = document.getElementById("mySummary");
Try it Yourself »

Create a Summary Object

You can create a <summary> element by using the document.createElement() method:

Example

var x = document.createElement("SUMMARY");
Try it Yourself »

Standard Properties and Events

The Summary object also supports the standard properties and events.

Related Pages

HTML reference: HTML <summary> tag

HTML reference: HTML <details> tag

JavaScript reference: HTML DOM Details Object


Superscript

Superscript Object

The Superscript object represents an HTML <sup> element.

Access a Superscript Object

You can access a <sup> element by using getElementById():

Example

var x = document.getElementById("mySup");
Try it Yourself »

Create a Superscript Object

You can create a <sup> element by using the document.createElement() method:

Example

var x = document.createElement("SUP");
Try it Yourself »

Standard Properties and Events

The Superscript object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <sup> tag

JavaScript reference: HTML DOM Subscript Object


Table

Table Object

The Table object represents an HTML <table> element.

Access a Table Object

You can access a <table> element by using getElementById():

Example

var x = document.getElementById("myTable");
Try it Yourself »

Create a Table Object

You can create a <table> element by using the document.createElement() method:

Example

var x = document.createElement("TABLE");
Try it Yourself »

Table Object Collections

Collection Description
rows Returns a collection of all <tr> elements in a table
tBodies Returns a collection of all <tbody> elements in a table

Table Object Properties

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

Table Object Methods

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

Standard Properties and Events

The Table object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Tables

HTML reference: HTML <table> tag


TableData

TableData Object

The TableData object represents an HTML <td> element.

Access a TableData Object

You can access a <td> element by using getElementById():

Example

var x = document.getElementById("myTd");
Try it Yourself »

Tip: You can also access a <td> element by searching through the cells collection of a table row.

Create a TableData Object

You can create a <td> element by using the document.createElement() method:

Example

var x = document.createElement("TD");
Try it Yourself »

TableData Object Properties

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

Standard Properties and Events

The TableData object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Tables

HTML reference: HTML <td> tag


TableHeader

TableHeader Object

The TableHeader object represents an HTML <th> element.

Access a TableHeader Object

You can access a <th> element by using getElementById():

Example

var x = document.getElementById("myTh");
Try it Yourself »

Tip: You can also access a <th> element by searching through the cells collection of a table row.

Create a TableHeader Object

You can create a <th> element by using the document.createElement() method:

Example

var x = document.createElement("TH");
Try it Yourself »

TableHeader Object Properties

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

Standard Properties and Events

The TableHeader object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Tables

HTML reference: HTML <th> tag


TableRow

TableRow Object

The TableRow object represents an HTML <tr> element.

Access a TableRow Object

You can access a <tr> element by using getElementById():

Example

var x = document.getElementById("myTr");
Try it Yourself »

Tip: You can also access a <tr> element by searching through the rows collection of a table.

Create a TableRow Object

You can create a <tr> element by using the document.createElement() method:

Example

var x = document.createElement("TR");
Try it Yourself »

TableRow Object Collections

Collection Description
cells Returns a collection of all <td> or <th> elements in a table row

TableRow Object Properties

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

TableRow Object Methods

Method Description
deleteCell() Deletes a cell from the current table row
insertCell() Inserts a cell into the current table row

Standard Properties and Events

The TableRow object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Tables

HTML reference: HTML <tr> tag


Textarea

Textarea Object

The Textarea object represents an HTML <textarea> element.

Access a Textarea Object

You can access a <textarea> element by using getElementById():

Example

var x = document.getElementById("myTextarea");
Try it Yourself »

Tip: You can also access a <textarea> element by searching through the elements collection of a form.

Create a Textarea Object

You can create a <textarea> element by using the document.createElement() method:

Example

var x = document.createElement("TEXTAREA");
Try it Yourself »

Textarea Object Properties

= Property added in HTML5.

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

Textarea Object Methods

Method Description
select() Selects the entire contents of a text area

Standard Properties and Events

The Textarea object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <textarea> tag


Time

Time Object

The Time Object is new in HTML5.

The Time object represents an HTML <time> element.

Access a Time Object

You can access a <time> element by using getElementById():

Example

var x = document.getElementById("myTime");
Try it Yourself »

Create a Time Object

You can create a <time> element by using the document.createElement() method:

Example

var x = document.createElement("TIME");
Try it Yourself »

Time Object Properties

Property Description
dateTime Sets or returns the value of the datetime attribute in a <time> element

Standard Properties and Events

The Time object also supports the standard properties and events.

Related Pages

HTML reference: HTML <time> tag


Title

Title Object

The Title object represents an HTML <title> element.

Access a Title Object

You can access a <title> element by using getElementsByTagName():

Example

var x = document.getElementsByTagName("TITLE")[0];
Try it Yourself »

Create a Title Object

You can create a <title> element by using the document.createElement() method:

Example

var x = document.createElement("TITLE");
Try it Yourself »

Title Object Properties

Property Description
text Sets or returns the text of the document's title

Standard Properties and Events

The Title object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML Head

HTML reference: HTML <title> tag


Track

Track Object

The Track Object is new in HTML5.

The Track object represents an HTML <track> element.

Access a Track Object

You can access a <track> element by using getElementById():

var x = document.getElementById("myTrack");

Create a Track Object

You can create a <track> element by using the document.createElement() method:

var x = document.createElement("TRACK");

Track Object Properties

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

Standard Properties and Events

The Track object also supports the standard properties and events.

Related Pages

HTML reference: HTML <track> tag


Underline

Underline Object

The Underline object represents an HTML <u> element.

Access an Underline Object

You can access a <u> element by using getElementById():

Example

var x = document.getElementById("myU");
Try it Yourself »

Create an Underline Object

You can create a <u> element by using the document.createElement() method:

Example

var x = document.createElement("U");
Try it Yourself »

Standard Properties and Events

The Underline object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <u> tag


Ul

Ul Object

The Ul object represents an HTML <ul> element.

Access a Ul Object

You can access a <ul> element by using getElementById():

Example

var x = document.getElementById("myUL");
Try it Yourself »

Create a Ul Object

You can create a <ul> element by using the document.createElement() method:

Example

var x = document.createElement("UL");
Try it Yourself »

Ul Object Properties

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

Standard Properties and Events

The Ul object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Lists

HTML reference: HTML <ul> tag


Variable

Variable Object

The Variable object represents an HTML <var> element.

Access a Variable Object

You can access a <var> element by using getElementById():

Example

var x = document.getElementById("myVar");
Try it Yourself »

Create a Variable Object

You can create a <var> element by using the document.createElement() method:

Example

var x = document.createElement("VAR");
Try it Yourself »

Standard Properties and Events

The Variable object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <var> tag


Video

Video Object

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.

Access a Video Object

You can access a <video> element by using getElementById():

Example

var x = document.getElementById("myVideo");
Try it Yourself »

Create a Video Object

You can create a <video> element by using the document.createElement() method:

Example

var x = document.createElement("VIDEO");
Try it Yourself »

Video Object Properties

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

Video Object Methods

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

Standard Properties and Events

The Video object also supports the standard properties and events.

Related Pages

HTML tutorial: HTML5 video

HTML reference: HTML <video> tag