Thursday 3 January 2013

HTML 5 basic Tutorials part 4 Element and Attribute


In this article we  go through the element and attribute of the html 5

ELEMENT:-

html element are the basic structure of the html … the document
Are simple text made of up html element and this elements are defined using the tags. The browser understand only the tags… and then render the tag ….the element are written in between the opening and closing tag.

E.g.:-

<tag name>this is element.</tag name>
There are more than >100 tag in the html5.click here to see.you see all this tag I the future article..

Opening tag
Element
Closing tag
<p>
This is example
</p>
<h1>
This another ex
</h1>

Have a look at simple example of the element

<!doctype><html>
<head>
<title>HTML 5 Tutorial </title>
</head>
<body>
<p>this is example of the element</p>
</body>
</html>

Attribute:-

The html tag are can settled there attribute using the attribute in between the tag .the attribute are provide with segtex

ATTRIBUTE=”VALUE”
Some of the example of the attribute is <img src="TBE.jpg" width="220" height="230">
 With attribute of height and width


Attribute
Options
Function
Access key
User Defined
Specifies a keyboard shortcut to access an element.
align
right, left, center
Horizontally aligns tags
background
URL
Places an background image behind an element

bgcolor
numeric, hexidecimal,
Places a background color behind an element
contenteditable
true, false
Specifies if the user can edit the element's content or not.
contextmenu
Menu id
Specifies the context menu for an element.
data-XXXX
User Defined
Custom attributes. Authors of a HTML document can define their own attributes. Must start with "data-".
draggable
true,false, auto
Specifies whether or not a user is allowed to drag an element.
height
Numeric Value
Specifies the height of tables, images, or table cells.
hidden
hidden
Specifies whether element should be visible or not.
id
User Defined
Names an element for use with Cascading Style Sheets.
item
List of elements
Used to group elements.
itemprop
List of items
Used to group items.
spellcheck
true, false
Specifies if the element must have it's spelling or grammar checked.
style
CSS Style sheet
Specifies an inline style for an element.
subject
User define id
Specifies the element's corresponding item.
tabindex
Tab number
Specifies the tab order of an element.
title
User Defined
"Pop-up" title for your elements.
valign
top, middle, bottom
Vertically aligns tags within an HTML element.
width
Numeric Value
Specifies the width of tables, images, or table cells.










0 comments:

Post a Comment