Home > DeveloperSection > Articles > Global attributes HTML 5

Global attributes HTML 5

Posted by  Awadhendra Tiwari
on    July-23-2011 17:22 PM

HTML5 HTML5 
Ratings:
0 Comment(s)
 1750  View(s)
Rate this:

Global attributes HTML 5

The attributes listed below are supported by all HTML 5 tags.

HTML 5 global attributes

access key

Specifies shortcut key that can be used to access element.

<a href="http://www.mindstick.com/" accesskey="m">MINDSTICK</a>

class

We will use class attribute to specify css on element tag in html5.

contenteditable

Sets whether the user can edit the content or not. This is a boolean attribute. If true then user can edit content of element if false then user can not edit content of element. By default it is false.

<div contenteditable="true" style="width:300px;height:300px;overflow:auto;border:3px solid red">

</div>

contextmenu

This attribute specifies the context menu for an element in html5.

dir

This attribute specifies the direction of the text for an element in html5.

draggable

This attribute specifies that users are allowed drag element or not.

hidden

This attribute specifies whether element should visible or not. This is a Boolean attribute.

id

This attribute specifies the elements identity that should be unique. On scripting language we can access element via this id.

lang

This attribute specifies a language code for the content in an element in html5.

spellcheck

Specifies whether the element should have its spelling checked or not.

dropzone

Specifies what happens when dragged items/data is dropped in the element.

tabindex

Determine the tabbing order (when the user 'tabs' through the elements on the page).

title

Specifies extra information about an element

style

This attribute is used to apply css style on elements. We will used it as follows.

style="width:300px;height:300px;overflow:auto;border:3px solid red"

 

 
















Recent Activities


Barbara Jones added new Question What is ANR?   3 days ago

Kamlakar Singh added new Blog Convert Text Document to PDF File   17 days ago

Kamlakar Singh added new Article Introduction to Backbone.js   17 days ago

Don't want to miss updates? Please click the below button!