Tables with Different Styles
Table:
Output:
EX:create a sample form with different height and width properties for table and form elements.
Code:
OUTPUT:
Table:
- Html table element is defined with in the <table> tag
- Html table head is defined by using <th> tag.
- Each table row is defined with <tr> tag.
- Table data is defined by using td tag.
Table Properties:
- If we do not specify any border then border will not displayed.
- we can define table border as border-width,border-type,border-color.
- We can define all these 3 properties as a single property like border:1px solid red.
- Margin property is used to provide margin for table from top,left,right,bottom side.
- Padding property is used top increase space with in the cells.
Ex:Table With Different Borders
OUTPUT:
1)
EX:Table with Different borders and with different Padding.
Code:
Code:
Margin and Padding: It creates a space in outside of the border where padding creates a space in inside of the table.These are the two most commonly used properties in table.
Output:
EX:create a sample form with different height and width properties for table and form elements.
Code:
OUTPUT: