.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Post New Resource Bookmark and Share   

HTML tags attributes and events basics

Posted By:Maverick       Posted Date: July 31, 2011    Points: 200    Category:    URL: http://www.dotnetspark.com  

HTML tags attributes and events basics
 

Core Attributes

Not valid in base, head, html, meta, param, script, style, and title elements.

Attribute

Value

Description

class

class_rule or style_rule

The class of the element

id

id_name

A unique id for the element

style

style_definition

An inline style definition

title

tooltip_text 

A text to display in a tool tip

 


Language Attributes

Not valid in base, br, frame, frameset, hr, iframe, param, and script elements.

Attribute

Value

Description

dir

ltr | rtl

Sets the text direction

lang

language_code

Sets the language code

 


Keyboard Attributes

Attribute

Value

Description

accesskey

character

Sets a keyboard shortcut to access an element

tabindex

number

Sets the tab order of an element

 

Window Events

Only valid in body and frameset elements.

Attribute

Value

Description

onload

script

Script to be run when a document loads

onunload

script

Script to be run when a document unloads

 


Form Element Events

Only valid in form elements.

Attribute

Value

Description

onchange

script

Script to be run when the element changes

onsubmit

script

Script to be run when the form is submitted

onreset

script

Script to be run when the form is reset

onselect

script 

Script to be run when the element is selected

onblur

script 

Script to be run when the element loses focus

onfocus

script 

Script to be run when the element gets focus

 


Keyboard Events

Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.

Attribute

Value

Description

onkeydown

script 

What to do when key is pressed

onkeypress

script 

What to do when key is pressed and released

onkeyup

script 

What to do when key is released

 


Mouse Events

Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, title elements.

Attribute

Value

Description

onclick

script 

What to do on a mouse click

ondblclick

script 

What to do on a mouse double-click

onmousedown

script 

What to do when mouse button is pressed

onmousemove

script 

What to do when mouse pointer moves

onmouseout

script

What to do when mouse pointer moves out of an element

onmouseover

script

What to do when mouse pointer moves over an element

onmouseup

script 

What to do when mouse button is released

 



     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend