HTML Attributes

Attribute is a modifier of an Html element,ie it provide additional informations or charactoristics of an Html element.Html attributes customize the webpages. Attribute or property of an element enclosed between opening and closing tags.

Following table desribes about attributes in html.

Attribute Description
accesskey Specifies a shortcut key to activate/focus an element
class Specifies one or more classnames for an element (refers to a class in a style sheet)
contenteditable Specifies whether the content of an element is editable or not
contextmenu Specifies a context menu for an element. The context menu appears when a user right-clicks on the element
data Used to store custom data private to the page or application
dir Specifies the text direction for the content in an element
draggable Specifies whether an element is draggable or not
dropzone Specifies whether the dragged data is copied, moved, or linked, when dropped
hidden Specifies that an element is not yet, or is no longer, relevant
id Specifies a unique id for an element
lang Specifies the language of the element's content
spellcheck Specifies whether the element is to have its spelling and grammar checked or not
style Specifies an inline CSS style for an element
tabindex Specifies the tabbing order of an element
title Specifies extra information about an element
translate Specifies whether the content of an element should be translated or not


1.All elements in HTML can be its Attribute.
2.HTML title attribute provides additional "tool-tip" information
3.For providing address informations href attribute is used.
4.Width and height Attributes of images describes about the size variations.
5. alt attribute provides text for screen readers.

Jesna N Scaria

Articles : 32

I am a Software Developer at Leedhar Technologies
India India