Tuesday, July 10, 2012

HTML Elements

An HTML Element is everything from the opening  tag  to the closing tag.
The structure of a HTML element looks like this:
                    <starttag attributes>element content</endtag>
 Note:
  • A HTML element with no content is called as empty HTML element Ex: <br/>
  • HTML elements can be nested ,but tags should be properly closed.Ex:<div><a href=''><img src=''/></a></div>
    • (<div>-Division tag is used to represent a set of tags as a section or division,so that the whole block can be formatted)
  • Each HTML Element has a set of attributes that can provide additional information about an element  and also control the properties and behavior of that element. Ex:.There a few common attributes  for most of the HTML elements.
    • id-Identifies a unique element.The value of id can be used as a reference.
    • class-used to refer a CSS class(CSS or Cascading Style Sheet is used to beautify your web page.we will be dealing in depth about CSS later).
    • style-for styling the HTML element.Ex:<img src='' style='cursor:pointer;' /> .
    • title-adds a title to the HTML element
    • Event Attributes-like onclick,onmousehover,onload,onunload,onmouseout....
    • dir- specifies the directionality of text i.e left to right or right to left.
You can refer in detail at this link. Please report broken links.stay tuned.

0 comments:

Post a Comment