This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

HTMLElement

Summary

HTMLElement is the interface that all DOM Nodes subclass from. It provides functionality specific to HTML that is not present in the basic Element interface.

Inherits from ElementElement

Properties

aria-activedescendant
:

aria-busy
:

aria-checked
:

aria-controls
:

aria-describedby
Sets or retrieves a list of elements that describe the current object.

aria-disabled
:

aria-expanded
:

aria-flowto
:

aria-haspopup
:

aria-hidden
:

aria-invalid
:

aria-labelledby
:

aria-level
:

aria-multiselectable
:

aria-owns
:

aria-posinset
:

aria-pressed
:

aria-readonly
:

aria-relevant
:

aria-required
:

aria-secret
:

aria-setsize
:

aria-valuemax
:

aria-valuemin
:

aria-valuenow
:

x-ms-aria-flowfrom
:

attribute
:

canHaveHTML
:

cellIndex
:

className
:

clientHeight
:

clientLeft
:

clientTop
:

clientWidth
:

controlRange
:

dir
:

disabled
:

document
:

draggable
Gets or sets whether an element can be dragged and dropped.

elements
:

embeds
:

form
:

frameElement
:

indeterminate
:

index
:

innerHTML
:

innerText
:

isContentEditable
:

isDisabled
:

isMultiLine
:

isOpen
:

length
:

maxConnectionsPerServer
:

name
:

offscreenBuffering
:

offsetHeight
:

offsetLeft
:

offsetParent
:

offsetTop
:

offsetWidth
:

options
:

outerHTML
:

outerText
:

palette
:

parentWindow
:

position
:

readyState
:

rowIndex
:

rows
:

scrollHeight
:

scrollLeft
:

scrollTop
:

scrollWidth
:

sectionRowIndex
:

selectedIndex
:

self
:

sourceIndex
:

specified
:

spellcheck
:

tagName
:

tagUrn
:

uniqueID
:

value
:

viewLink
:

vrml
:

ATOMICSELECTION html attribute
Specifies whether the element and its contents must be selected as a whole, indivisible unit.
BaseHref
Retrieves a string of the URL where the object tag can be found, often the href of the document that the object is in, or the value set by a base element.

aLink
:

abbr
Indicates an abbreviation or an acronym.
accept
This attribute supplies browsers with a hint about what filetypes its element will accept.
accessKey
Sets a keyboard keystroke for selection of its element, which would otherwise be done using a mouse.

align
:

allowTransparency
Sets or retrieves whether the object can be transparent.
alt
The alt attribute is used as a textual representation for graphics and buttons in browsers that don’t or can’t render images, or when the resource is not found.
autocomplete
The autocomplete attribute specifies whether a browser should automatically provide values for a form element.
autofocus
Provides a way to direct a user to a specific field when a document loads.

balance
:

bgProperties
:

border
Specifies the width of the border around an element. Deprecated in HTML4, not supported in HTML5. Use CSS.
border (frameSet, iframe)
Sets or retrieves the space between the frames, including the 3-D border.
HTML Media Capture
The capture attribute facilitates user access to a device’s media capture mechanism, such as a camera, or microphone, from within a file upload control, for capturing media on the spot.
cellPadding
Specifies the space, in pixels, between the cell wall and the cell content. Not supported in HTML5. Use CSS.
cells
Retrieves a collection of all cells in the table row or in the entire table.
ch
Sets an alignment character. The first occurrence of the alignment character in each cell in a column will be on a vertical axis.
chOff
Removes an alignment character set by the attribute ch.
checked
Indicates the initial state of a checkbox or radio button.

cite
:

class
Specifies one or more classes for an element, usually used to point to a class in a style sheet.
classid
Sets or retrieves the class identifier for the object.

clear
:

codeBase
Sets or retrieves the URL of the component.

codeType
:

colSpan
:

color
The foreground color of the text of an object.

cols
:

cols (TextArea element)
:

cols (frameSet)
Sets or retrieves the number of columns in the table.

compact
:

content
:

contentEditable
Sets or retrieves the string that indicates whether the user can edit the content of the object.

coords
:

html/elements/data
:

dataFld
Sets or retrieves a field of a given data source, as specified by the dataSrc property, to bind to the specified object.

dataFormatAs
:

dataPageSize
:

dataSrc
Sets or retrieves the source of the data for data binding.
dir
Global attribute. Specifies the element’s text directionality.
disabled
Prevents users from changing, clicking on, or submitting an element.
face
Sets or retrieves the current typeface family.
formAction
The formaction attribute specifies the URL of a file that will process the input control when the form is submitted.
formEnctype
The formenctype attribute specifies how the form-data should be encoded when submitting it to the server.
formMethod
The formmethod attribute defines the HTTP method for sending form-data to the action URL.
formNoValidate
When present, it specifies that the <input> element should not be validated when submitted.
formtarget
Specifies a name or a keyword that indicates where to display the response that is received after submitting the form.

frame
:

height
Specifies the height of the certain content elements in pixels.
hidden
The hidden attribute is a boolean attribute. When specified on an element, it indicates that the element is not yet, or is no longer, directly relevant to the page’s current state, or that it is being used to declare content to be reused by other parts of the page as opposed to being directly accessed by the user.

hideFocus
:

href
Sets or retrieves a destination URL or an anchor point

hreflang
:

httpEquiv
:

id
The id attribute is used for identifying elements in a document.
is
Describes the base element from which the element with this attribute is extended.

label
:

list
The list attribute refers to a <datalist> element specifying possible values to suggest for an input element.
longdesc
Links an image to a description of its content, for enhanced accessibility
loop
Sets or retrieves the number of times a sound or video clip will loop when activated.
max (HTMLInputElement)
The max attribute specifies the maximum value for an <input> element.
maxLength
The maxLength attribute sets an upper limit on the number of characters that can be entered in an input element.
min
The min attribute specifies the minimum value for an <input> element.
multiple
The multiple attribute indicates that the user is allowed to enter more than one value in an <input> element.

name
:

name (frames)
:

name (meta object)
:

name (window)
:

name param element))
:

noHref
:

noResize
:

noShade
:

noValidate
When present, it specifies that the form-data (input) should not be validated when submitted.

noWrap
:

pattern
The pattern attribute specifies a regular expression that the <input> element’s value is checked against.
placeholder
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format).

pluginspage
:

readonly
:

rel
Describes the relationship from the current document to the anchor specified by the href attribute.
required
The required attribute is a boolean attribute. When present, it specifies that an input field must be filled out before submitting the form.

rev
:

rightMargin
:

role
:

rowSpan
:

rules
:

sandbox
:

scheme
:

scope
:

scroll
:

scrolling
:

security html attribute
:

selected
:

shape
:

size
This article outlines the HTML attribute "size", which allows the user to specify a width in characters of an <input> element.

size (control)
:

size (hr)
:

span
:

src
:

src (iframe, embed, xml)
:

src (input, img)
:

src (script)
:

standby
A message for the browser to show while an object's implementation and data load.

start
:

start (ol)
:

step
Specify the increment for input with types number, time, or range
style
Sets an inline style for the element.

summary
:

tabIndex
Represents the tab order of an element.

tabStop
:

target
Target is a link attribute, which defines where to open the link.

title
:

topMargin
:

type
The type attribute is used to define what sort of type an input or ordered list element is.

type (button element)
:

type (param element)
:

type (script element)
:

type (select element)
:

type (textarea element)
:

type (ul,li,ol elements)
:

units
:

url
:

urn
:

useMap
:

vAlign
:

vAlign (table caption)
:

vLink
:

value (HTMLProgressElement)
:

value (button element)
:

value (input elements)
:

value (li element)
:

value (param element)
:

value (select, option element)
:

value (textarea element)
:

valueType
:

vcard name
:

[version](/html/attributes/version_(dom/version)
:

viewMasterTab
:

volume
:

vspace
:

width
Specifies the width, in pixels, of certain content elements.

width (img, input elements)
:

width (merge candidate)
:

wrap
Sets the wrap style (soft, hard, or off) for a text element.
alignment-baseline
Specifies how an element is aligned with respect to its parent; that is, specifies which baseline of the element is to be aligned with the corresponding baseline of the parent. Defaults to the baseline with the same name as the computed value of the alignment-baseline property.
baseline-shift
The ‘baseline-shift’ property allows repositioning of the dominant-baseline( a baseline-table and a baseline-table font-size which are those of the nearest block-level ancestor element and are applied to its root inline box.) relative to the dominant-baseline.

clip-rule
:

color-interpolation-filters
:

dominant-baseline
:

enable-background
:

fill
The attribute fill specifies the filling color or the behavior of an animation after it has finished.
fill-opacity
Please refer to /css/properties/fill-opacity
fill-rule
Please refer to /css/properties/fill-rule

flood-color
:

flood-opacity
:

glyph-orientation-horizontal
:

glyph-orientation-vertical
:

kerning
:

lighting-color
:

marker
:

marker-end
:

marker-mid
:

marker-start
:

mask
:

pointers
:

stop-color
:

stop-opacity
:

stroke-dasharray
:

stroke-dashoffset
:

stroke-linecap
:

stroke-linejoin
:

stroke-miterlimit
:

stroke-opacity
:

stroke-width
:

text-anchor
:

Methods

abort
:

blur
:

clearAttributes
:

click
Covers what the click action is and what happens when it is performed.

componentFromPoint
:

doScroll
:

focus
:

getBoundingClientRect
Returns a ClientRect object that encloses a group of text rectangles.
getClientRects
A collection of ClientRect objects, one for each CSS border box associated with the element. Each ClientRect object contains read-only left, top, right, and bottom properties describing the border box, relative to the top-left of the viewport. For tables with captions, the caption is included even though it is outside the border box of the table.

hide
:

item
:

matches
Returns true if an element matches a given selector. Otherwise, false.

namedItem
:

remove
:

setActive
:

setCustomValidity
:

show
:

toStaticHTML
:

Events

No events.

Inherited from Element

Properties

XMLDocument
:

XMLNS attribute
:

childElementCount
Returns the number of direct children of this node that are elements. Read-only.
children
Retrieves a live collection of child elements of an element.
classList
Reflects the class attribute as an ordered list of the whitespace separated class names and has convenience methods for add, remove, contains and more.

code
:

entities
:

error
:

firstElementChild
Retrieves the first child of this node that is an element, if there is one, or null otherwise. Read-only.

htmlText
:

internalSubset
:

isTextEdit
:

lastElementChild
Retrieves the last child of this node that is an element, if there are any element children, or null otherwise. Read-only.

media
:

nextElementSibling
Retrieves the element node that is a sibling to this element node (a direct child of the same parent) and is immediately after it in the DOM tree, ignoring text nodes, comment nodes and any other non-element nodes. If there is no next element sibling, the property value is null. Read-only.

notations
:

onerror
:

onload
:

onloadend
:

onloadstart
:

onprogress
:

ownerElement
:

parent
:

parentElement
Retrieves the parent node of this DOM node, if the parent is an element node; null if the parent is not an element or if there is no parent. Read-only.

parentTextEdit
:

previousElementSibling
Retrieves the element node that is a sibling to this element node (a direct child of the same parent) and is immediately previous to it in the DOM tree, ignoring text nodes, comment nodes and any other non-element nodes. If there is no previous element sibling, the property value is null. Read-only.

readyState
:

result
:

size
:

systemLanguage
:

type
:

Methods

msWriteProfilerMark
:

querySelector
Returns the first element that matches the provided selector.
querySelectorAll
Returns a list of elements that match a provided selector.

RangeException
:

createControlRange
:

getAdjacentText
Non standard. Gets a text from a given location around the edges of the element.
getAttribute
Returns the value of the content attribute.
getAttributeNS
Returns the value of the content attribute within a specified namespace.
getAttributeNode
Retrieves an attribute node by name.
getAttributeNodeNS
Gets an attribute node that matches the specified namespace and name.
hasAttribute
Determines whether a content attribute exists on an element.
hasAttributeNS
Determines whether a content attribute in a specified namespace exists on an element.

inRange
:

insertAdjacentHTML
Parses and inserts HTML code at or beyond the edges of an element within the document hierarchy.

isEqual
:

item
:

releasePointerCapture
Releases a pointer captured by an element (using the setPointerCapture method).
removeAttribute
Removes a specified content attribute from an element.
removeAttributeNS
Removes a specified content attribute in a specified namespace from an element.

removeAttributeNode
:

requestFullscreen
The requestFullscreen method provides a way for presenting web content using the user’s entire screen. The API lets you easily direct the browser to make an element — and its children, if any — occupy the full available screen space, without borders or other chrome elements.
requestPointerLock
requestPointerLock lets you lock the target of mouse events to a single element while hiding the cursor.

scrollByLines
:

scrollByPages
:

scrollIntoView
Scrolls the page to the point where the element shows up.

scrollIntoViewIfNeeded
:

setAttribute
Sets the value of a content attribute.
setAttributeNS
Sets the value of a content attribute in a specified namespace.

setAttributeNode
:

setAttributeNodeNS
:

setPointerCapture
Assigns a specified pointer to an element. This method is used to ensure that an element continues to receive pointer events even if the contact moves off the element.

Events

error
The onerror event occurs when the request could not be completed because of an error.
load
After the onload event has occurred, responseText contains the complete server response.
progress
When the onprogress event occurs, partial data can be retrieved using responseText.
timeout
The ontimeout event occurs if the ontimeout period elapses before the onload event occurs.

change
:

cuechange
:

durationchange
:

emptied
:

ended
:

hashchange
:

help
:

input
:

layoutcomplete
:

load
:

loadeddata
:

loadedmetadata
:

loadstart
:

losecapture
:

move
:

moveend
:

movestart
:

offline
:

online
:

page
:

paste
:

pause
:

play
:

playing
:

propertychange
:

ratechange
:

readystatechange
:

reset
:

resize
:

resizeend
:

resizestart
:

seeked
:

seeking
:

stalled
:

submit
:

suspend
:

timeupdate
:

unload
:

volumechange
:

waiting
:

error
:

load
:

onabort
:

onzoom
:

resize
:

scroll
:

unload
:

Inherited from Node

Properties

attributes
Associatve array containing the attributes of node.
childNodes
Gets a collection of direct Node descendants of the Node, including Element, Text and any other type of nodes.
firstChild
Gets a reference to the first child node in the childNodes collection of the object. If the node is childless, null is returned.
lastChild
Gets a reference to the last child in the childNodes collection of an object.
localName
Retrieves the local name of the fully qualified XML declaration for a node.
namespaceURI
Retrieves the namespace URI of the fully qualified XML declaration for a node.
nextSibling
Retrieves the next child node of the parent of the node.
nodeName
Gets the name of a particular type of node.
nodeType
Retrieves the type of the requested node.
nodeValue
Gets or sets the value of a Node, if the type of Node supports it.
ownerDocument
Retrieves the document object associated with the node.
parentNode
Retrieves the parent node in the document hierarchy.
prefix
Sets or retrieves the prefix of the fully qualified XML declaration for a node.
previousSibling
Retrieves the previous child node of the parent of the node.
textContent
Sets or retrieves the text content of a node and any child nodes.

Methods

appendChild
Appends an element as a child to the object.
cloneNode
Copies a reference to the object from the document hierarchy.
compareDocumentPosition
Compares the position of two nodes in a document.
empty
Cancels the current selection, sets the selection type to none, and sets the item property to null.
hasAttributes
Returns whether this node (if it is an element) has any attributes
hasChildNodes
Gets a value that indicates whether the Node has any direct Node descendant of any type.
insertBefore
Inserts a child into the node, immediately before the specified reference child node.
isDefaultNamespace
Indicates whether or not a namespace is the default namespace for a document.
isEqualNode
Determines whether two nodes are equal in their type, name and namespace.
isSameNode
Determines if two nodes are the same node.
isSupported
Returns a value indicating whether or not the object supports a specific DOM standard.
lookupNamespaceURI
Gets the URI of the namespace associated with a namespace prefix, if any.
lookupPrefix
Gets the namespace prefix associated with a URI, if any.
normalize
Merges adjacent DOM objects to produce a normalized document object model.
removeChild
Removes a child node from a node.
replaceChild
Replaces an existing child node with a new child node.

Events

No events.

Notes

All HTML element interfaces derive from this class.

Attributions