Saturday 16 February 2013

Components of HTML

There are three foundational components of HTML.
  • Tags
  • Attributes
  • Values


TAGS

The main part of HTML command is tag (technically it is referred as elements) HTML documents are defined by HTML elements.
Tag is a identity of html tag says to "do this". modifications makes tag powerful. and these modifications are done by attributes.
There are general rules about html tags...
1.All standard tags are contained within the less than(<) and greater than(>) symbols as follows
called opening tag.
2.There are no space between the the symbols and the tags .as follows
3.Add a forward slash before the tag to denote the tag closure. as follows
called closing tag.
4.There must be closing for every opening tag.

ATTRIBUTES
Attributes modify the action of tags. some tags works properly without attributes but some requires attributes for function. as
tag and its companion closing tag needs no attribute because this is just to  tell about the  beginning  of html document and ending of it.
but tag and its companion tag needs attribute because this tag denotes the area of  html document that will be viewed within the browser .attributes are often whole words some times they are partial words. whole word attributes include align ,link, color and face.
partial word examples are src for "source" ,and "vlink" for visited links  .

VALUES
Values are the defining aspects of attributes and they modify the tags. several values for align tag are left ,right ,center and justify.
let us understand it in terms of font a font requires some size and some color .the value which we pass for color and size are called the
values for the attributes size and color.

eg. this is some text
here is a tag
size and color are the attributes and 3 and red are the values of attributes.



here is the example to understand the difference between tag ,attribute and values


No comments:

Post a Comment