Hello, world!

HTML 5 Attributes HTML

HTML tutorial describes the HTML5 attributes which are identified as standard attributes and custom attributes. Some of the features under standard attributes are accesskey, contextmenu, draggable, itemprop, tabindex, valign and many more.

HTML5 Attributes

Attributes may only be identified within start tags and should never be used in end tags.
Attribute names for HTML elements are case insensitive and may be written with any mix of uppercase or lowercase, but written it in lowercase is the usual convention.

Standard Attributes

Below are list of attributes, their option and their function:
accesskey (User Defined) - Represents a keyboard shortcut to activate an element.
align (right, left, center) - aligns tags Horizontally
background (URL) - Put a background image behind an element
bgcolor (numeric, hexadecimal, RGB values) - Put a background color behind an element
class (User Defined) - Categorizes an element for use with Cascading Style Sheets.
contenteditable (true, false) - Indentifies whether the element's content can edit or not by the user.
contextmenu (Menu id) - Indentifies the context menu for an element.
data-XXXX (User Defined) - Custom attributes. Authors of a HTML content can identify their own attributes. Must begin with "data-".
draggable (true,false, auto) - Indentifies whether an element is draggable or not.
height (Numeric Value) - Indentifies the height or how tall the tables, images, or table cells are.
hidden (hidden) -  Indentifies if element should be visible or not.
id (User Defined) - Gives a unique name for an element for use with Cascading Style Sheets.
item (List of elements) - This attribute is used to group elements.
itemprop (List of items) - This attribute is used to group items.
spellcheck (true, false) - Indentifies if the element’s contents needs to check its spelling or grammar.
style (CSS Style sheet) - Indentifies an inline style for an element.
subject (User define id) - Indentifies the element's related item.
tabindex (Tab number) - Indentifies the tab order of an element in the document.
title (User Defined) - "Pop-up" title or information associated with your elements.
valign (top, middle, bottom) - Aligns tags vertically inside an HTML element.
width (Numeric Value) - Indentifies the width or how wide the tables, images, or table cells.

Custom Attributes

Custom data attributes is the new feature launched in HTML 5.
To access custom data attribute, reference it by name and starts with "data-" prefix.
<div class="example" data-subject="chemistry" data-level="complex">

This example will be completely valid HTML5 with two custom attributes known as data-subject anddata-level.
By using JavaScript APIs or CSS in same way as you obtain for standard attributes, you will get the values of these attributes.