Greg Owen
Over 27 Years of Programming Experience
Programming Examples, Portfolio, and More
Home

HTML Table Example

The example below displays how to create a table using HTML and the <table> tag.

The example below consists of the following elements:
<table> This tag begins the table.

border = "1" This attribute defines the width of the border. If this attribute is not added to the table tag, no border will be displayed.
<tr> This tag begins a row in the table.

<tr> This tag begins a row in the table.

<td> This tag defines a column in the table, and stands for the table data.

<th> This tag defines a table header. All text within this tag will be displayed in bold.

align="tright" This attribute is used below in the <td>tag to align the data displayed to the right of the column.


             <table border="1″>
                <tr>
                    <th>Grade</th>
                    <th>Student Count</th>
                </tr>
                <tr>
                    <td>A</td>
                    <td align="right">10</td>
                </tr>
                <tr>
                    <td>B</td>
                    <td align="right">11</td>
                </tr>
                <tr>
                    <td>C</td>
                    <td align="right">7</td>
                </tr>
                <tr>
                    <td>D</td>
                    <td align="right">3</td>
                </tr>
                <tr>
                    <td>F</td>
                    <td align="right">2</td>
                </tr>
            </table>
        
Grade Student Count
A 10
B 11
C 7
D 3
F 2


#HTML

Add a C# Dropdown to a Bootstrap Modal Dialog

This example combines C# and Bootstrap to create a bootstrap modal dialog containing an asp dropdown and an asp button to retrieve...

Continue Reading

Use C# to Populate Dropdown Lists With XML

The code below opens an xml file, reads the data from the xml file, dynamically adds a label for the dropdown list, and adds the dropdown list to the asp.net page...

Continue Reading

Add Style Properties to ASP.Net Controls to Improve Appearance

The default formatting for ASP.Net controls is very dated.  The default formatting is basically the same as the formatting in Visual Basic 1.0 ...

Continue Reading

Export To A Text File From A DataGridView Control

Add a button control to Form1.
Add a DataGridView Control to Form1....

Continue Reading