Global Attributes 13 attributes
accesskey
Specifies a shortcut key to activate/focus an element
contenteditable
Specifies whether the content of an element is editable
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
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 spelling and grammar checked
style
Specifies an inline CSS style for an element
tabindex
Specifies the tab order of an element
title
Specifies extra information about an element (as a tooltip)
translate
Specifies whether the content should be translated or not
Form Attributes 18 attributes
action
Specifies where to send the form data when a form is submitted
method
Specifies the HTTP method (GET or POST) to use when sending form data
enctype
Specifies how form data should be encoded when submitting it
autocomplete
Specifies whether the browser should autocomplete form fields
novalidate
Specifies that the form should not be validated when submitted
target
Specifies where to display the response after submitting the form
accept-charset
Specifies the character encodings the server can handle
name
Specifies the name of the form
rel
Specifies the relationship between the current document and the linked resource
accept
Specifies the types of files that the server accepts (only for file upload)
disabled
Disables the input or form control
readonly
Makes an input field read-only (cannot be edited)
multiple
Allows multiple values to be selected in input fields like file or select
required
Specifies that an input field must be filled out before submitting
placeholder
Provides a short hint that describes the expected value of an input field
pattern
Specifies a regex pattern that the input value must match
maxlength
Specifies the maximum number of characters allowed in an input field
size
Specifies the width of the input field in characters
Media Attributes 8 attributes
src
Specifies the URL of the media file
alt
Specifies an alternate text for images
controls
Specifies that video/audio controls should be displayed
autoplay
Specifies that the media will start automatically
loop
Specifies that the media will start over when finished
poster
Specifies an image to be shown while video is downloading
muted
Specifies that the audio output should be muted
preload
Specifies if and how the author thinks the media should be loaded
Link Attributes 9 attributes
rel
Specifies the relationship between the current document and the linked resource
href
Specifies the URL of the linked resource
type
Specifies the MIME type of the linked document
media
Specifies the media/device for which the linked resource is optimized
as
Specifies the type of content being preloaded
crossorigin
Specifies how the element handles cross-origin requests
hreflang
Specifies the language of the linked document
sizes
Defines the sizes of icons for different devices
disabled
Indicates that the link is disabled (used for alternate stylesheets)
Meta Attributes 8 attributes
charset
Specifies the character encoding for the HTML document
name
Specifies the name for metadata (like description, keywords, viewport)
content
Specifies the value associated with the name or http-equiv attribute
http-equiv
Provides an HTTP header for the information/value of the content attribute
viewport
Controls the viewport's size and scale for responsive design
X-UA-Compatible
Specifies which version of Internet Explorer should be used to render the page
robots
Specifies the behavior of search engine crawling and indexing
author
Specifies the name of the document's author
ARIA Attributes 10 attributes
aria-label
Defines a string label for an element, improving accessibility for screen readers
aria-hidden
Indicates whether an element is visible or hidden to assistive technologies
aria-checked
Indicates the current checked state of checkboxes, radio buttons, or menu items
aria-disabled
Indicates that the element is disabled and cannot be interacted with
aria-expanded
Indicates whether an element, like a collapsible section, is expanded or collapsed
aria-current
Indicates the current item in a set of items, such as a navigation menu
aria-required
Indicates that user input is required on the element before form submission
aria-live
Indicates that an element will be updated and live regions should be announced to users
role
Defines the role of an element (e.g., button, dialog, navigation) for assistive technologies
aria-controls
Identifies the element(s) that are controlled by the current element
Event Attributes 24 attributes
onclick
Fires when an element is clicked by the user
ondblclick
Triggered when an element is double-clicked
onmouseover
Occurs when the mouse pointer moves over an element
onmouseout
Fires when the mouse pointer moves out of an element
onmousedown
Fires when a mouse button is pressed down on an element
onmouseup
Occurs when the mouse button is released over an element
onkeydown
Fires when a key is pressed down on the keyboard
onkeyup
Occurs when a key is released after being pressed
onkeypress
Fires when a key is pressed and held down
onchange
Triggered when the value of an element changes
oninput
Occurs when an input field receives user input
onfocus
Fires when an element gains focus
onblur
Occurs when an element loses focus
onload
Fires when a page or image finishes loading
onunload
Triggered when a document is unloaded or the user leaves the page
onsubmit
Occurs when a form is submitted
onreset
Triggered when a form is reset
onresize
Fires when the browser window is resized
onscroll
Occurs when an element or window is scrolled
oncontextmenu
Fires when the context menu is triggered (right-click)
ondrag
Occurs when an element is being dragged
ondrop
Triggered when an element is dropped in a valid drop target
onerror
Fires when an error occurs while loading an external file like image or script
onwheel
Fires when the mouse wheel is scrolled over an element