Page 112 - Plus_V2.2_C7_Flipbook
P. 112
Purpose Table Properties
Alignment align, valign
Table framing frame
CSS Properties Used with <TABLE> Tag
CSS provides various properties which can be used with <TABLE> tag to accomplish various tasks.
They are border, border-style, border-color, border-spacing, width, padding, background-color and
color. These are global properties of CSS which means that these can be used with any element of
HTML.
Before we get into styling tables with CSS, we first need to create a simple HTML table and understand
what the different HTML elements associated with an HTML table mean.
<!DOCTYPE html>
<HEAD>
<TITLE>Table</TITLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<TH>Roll No.</TH>
<TH>Name</TH>
<TH>Grade</TH>
<TH>Gender</TH>
</TR>
<TR>
<TD>1</TD>
<TD>Aarav</TD>
<TD>B</TD>
<TD>M</TD>
</TR>
<TR>
<TD>2</TD>
<TD>Gauransh</TD>
<TD>A</TD>
<TD>M</TD>
</TR>
<TR>
<TD>3</TD>
<TD>Himakshi</TD>
<TD>A</TD>
<TD>F</TD>
</TR>
</TABLE>
</BODY>
</HTML>
110 Premium Edition-VII

