Prizes & Awards
My Profile
Active Members
TodayLast 7 Days
more...
|
Resources » Articles » General »
Optional Attributes for Body and Paragraph tag in HTMl
|
Body Tag:--
Syntax:-- <Body>....</Body>
Type:-- Container Tag End Tag is necessary.
Purpose:-- This tag defines the contents of the page all other tags which will add some objects to the body will be placed here the objects may be some text, image, animation etc..
Example:-- <Body>Contents of my page starts from here </Body>
Attributes:-- Following are the attributes of the Body Tag
1. Leftmargin * Value:- any valid integer * Purpose:-- To tell the browser what space you have to leave from the left side between the text and the browser boundary. * Example:-- 0,1,5,etc o <body leftmargin="0"> 2. RightMargin * Value:- any valid integer * Purpose:-- To tell the browser what space you have to leave from the right side between the text and the browser boundary. * Example:-- 0,1,5,etc * <body rightmargin="0"> 3. TopMargin * Value:- any valid integer * Purpose:-- To tell the browser what space you have to leave from the top side between the text and the browser boundary. * Example:-- 0,1,5,etc o <body topmargin="0"> 4. BottomMargin * Value:- any valid integer * Purpose:-- To tell the browser what space you have to leave from the bottom side between the text and the browser boundary. * Example:-- 0,1,5,etc o <body bottommargin="0"> 5. Bgcolor * Value:- any valid color name or the hexadecimal code * Purpose:-- To tell the browser to give the particular to the document. * Example:-- blue, #FF00F6 etc o <body bgcolor="pink"> o <body bgcolor="#ABC034"> 6. Background * Value:- any valid path for the image with its name and extention * Purpose:-- To tell the browser to use this image as the background for the document. * Example:-- <body background="c:\images\1.jpg"> 7. link * Value:- any valid color name or the hexadecimal code * Purpose:-- To tell the browser to give the particular to the links of the document. * Example:-- blue, #FF00F6 etc o <body link="red"> 8. alink * Value:- any valid color name or the hexadecimal code * Purpose:-- To tell the browser to give the particular to the active links of the document. * Example:-- blue, #FF00F6 etc o <body alink="yellow"> 9. vlink * Value:- any valid color name or the hexadecimal code * Purpose:-- To tell the browser to give the particular to the visited links of the document. * Example:-- blue, #FF00F6 etc o <body alink="green"> 10. style * Many other parameters are defined in it we will discuss it later as this attribute is common to most of the tags.
Paragraph Tag:-
Syntax: -- <p>.....</p>
Purpose:-- The Purpose or the utility of this tag is to make a paragraph for the body contents as we write in a word file or any other document we cerate paragraphs similarly here if we want to create a paragraph we have to create it in a tag.
Example:-- <p> This is my First Paragraph </p>
Type:- This is a container Tag end tag not compulsory
Attributes:-- The attributes of paragraph tag are
1. Align
* Values:- Left, Right, Center, Justify * Purpose:- to align the text of the paragraph. * Example :-- <p align="Right"> This is Right Aligned Para.</p> o <p align="center"> This is Center Aligned Para.</p>
== Thanks and Regards Meetu Choudhary
|
Responses
|
No responses found. Be the first to respond and make money from revenue sharing program.
|
|