/

HTML / CSS / JavaScript Tutorial

Standard DOM properties and methods

[this page | pdf | back links]

Applying a property or method to an HTML element involves a command along the lines of e.g.:

 

element.click()

 

where element is the variable corresponding to the HTML element and click()is the property or method applied to the element, here a method that simulates a mouse click of the element.

 

Properties and methods that can be applied to all HTML elements (and to some nodes that are not elements) are set out here:

 

HTML DOM elements also support all relevant HTML DOM event attributes, properties and methods.

 

Some DOM properties correspond to HTML attributes that are only applicable to certain types of HTML element. These include:

 

HTML Attribute

JavaScript DOM property

More

accept

accept

Here

accept-charset

acceptCharset

Here

accesskey

accessKey

Here

action

action

Here

alt

alt

Here

async

async

Here

autocomplete

autocomplete

Here

autofocus

autofocus

Here

autoplay

autoplay

Here

challenge

challenge

Here

charset

charset

Here

checked

checked

Here

cite

cite

Here

class

class

Here

cols

cols

Here

colspan

colspan

Here

content

content

Here

contenteditable

contenteditable

Here

contextmenu

contextmenu

Here

controls

controls

Here

coords

coords

Here

crossorigin

crossorigin

Here

data

data

Here

datetime

datetime

Here

default

default

Here

defer

defer

Here

dir

dir

Here

dirname

dirname

Here

disabled

disabled

Here

download

download

Here

draggable

draggable

Here

dropzone

dropzone

Here

enctype

enctype

Here

for

for

Here

form

form

Here

formaction

formaction

Here

formenctype

formenctype

Here

formmethod

formmethod

Here

formnovalidate

formnovalidate

Here

formtarget

formtarget

Here

headers

headers

Here

height

height

Here

hidden

hidden

Here

high

high

Here

href

href

Here

hreflang

hreflang

Here

http-equiv

httpEquiv

Here

icon

icon

Here

id

id

Here

ismap

ismap

Here

keytype

keytype

Here

kind

kind

Here

label

label

Here

lang

lang

Here

list

list

Here

loop

loop

Here

low

low

Here

manifest

manifest

Here

max

max

Here

maxlength

maxlength

Here

media

media

Here

method

method

Here

min

min

Here

multiple

multiple

Here

muted

muted

Here

name

name

Here

novalidate

novalidate

Here

open

open

Here

optimum

optimum

Here

pattern

pattern

Here

placeholder

placeholder

Here

poster

poster

Here

preload

preload

Here

radiogroup

radiogroup

Here

readonly

readonly

Here

rel

rel

Here

required

required

Here

reversed

reversed

Here

rows

rows

Here

rowspan

rowspan

Here

sandbox

sandbox

Here

scope

scope

Here

scoped

scoped

Here

selected

selected

Here

shape

shape

Here

size

size

Here

sizes

sizes

Here

span

span

Here

spellcheck

spellcheck

Here

src

src

Here

srcdoc

srcdoc

Here

srclang

srclang

Here

srcset

srcset

Here

start

start

Here

step

step

Here

style

style

Here

tabindex

tabindex

Here

target

target

Here

title

title

Here

translate

translate

Here

type

type

Here

usemap

usemap

Here

value

value

Here

width

width

Here

wrap

wrap

Here

xmlns

xmlns

Here

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile