html padding:

html padding is a great tool to set margins in html.So we will learn about the margins.
You can also set the margins such as Top margins, Left margin, right margin, margin width and margin height using attributes with the <BODY> tag. 

The various attributes that can be used to set margins are:



html padding





  • TOPMARGIN - This is used to enter the amount of space that you want between the top of the web browser window and top of the first element in the webpage.

           The margin value is specified by a positive number that represents the amount of pixels which you need to shift.

for example:

<BODY TOPMARGIN="200">......................</BODY>
  • BOTTOMMARGIN- this is used to enter the amount of space you want between the bottom of the web browser window and bottom of the last element in webpage.
for example:

<BODY BOTTOMMARGIN= "100">............................</BODY>
  • LEFTMARGIN- This attribute is used to enter the amount of space you want between the left edge of the web browser window and the left edge of the unindented text and other elements in the webpage.



for example:

<BODY LEFTMARGIN= "150">............................</BODY>
  • RIGHTMARGIN- This attribute is used to enter the amount of space you want between the right edge of the web browser window and the right edge of the unindented text and other elements in the webpage.



for example:

<BODY RIGHTMARGIN= "140">............................</BODY>
  • MARGINHEIGHT- This is used to enter the amount of space you want between the top and bottom edges of the web browser window and the top and bottom edges of the first and last element in the webpage, if you want to use  the same for the top and bottom margins.
  • MARGINWIDTH- This is used to enter the amount of space you want between the left and right edges of the web browser window and the left and right edges of indented text and other elements in a webpage, if you want to see the same value for the left and right margins.
NOTE: Proper html padding examples will be discussed in CSS section.

html padding 
html padding 
html padding 
html padding 
html padding 
html padding 
html padding 
html padding 
html padding 
html padding 
html padding 
html padding