Monday, April 13, 2015

HTML5 Attributes - cellpadding ,cellspacing , align , valign



cellpadding

  • Used to specified space between border and content
  • it is in pixels

cellspacing

  • Used to specified spaces between cell.
  • it is in pixels

In the following example you can clarify cellpadding , cellspacing and difference between them.






align

  • Used to set alignment
  • Values for the align parameters are
    • center (default)
    • left 
    • right 
In the following example you can see how to align whole table to center.






In the following example you can see how to align whole row to center and how to align specific column to center.







Like that you can align as you wish.


valign

  • Used to set  vertical alignment
  • Values for the valign parameters are
    • center (default)
    • top
    • bottom
In the following example you can see how to align  vertically.You can do it as you wish.





No comments:

Post a Comment