HTML Layout - Useful Tips CREATED BY =JAY-AR SIMON SEBASTIAN

Magsimula sa umpisa
                                        

To display a table with borders, specify the border attribute:

<table>

<tr>

<td>Row 1, cell 1</td>

<td>Row 1, cell 2</td>

</tr>

</table>

HTML Table Headers

Header information in a table are defined with the <th> tag.

All major browsers will display the text in the <th> element as bold and centered.

<table>

<tr>

<th>Header 1</th>

<th>Header 2</th>

</tr>

<tr>

<td>row 1, cell 1</td>

<td>row 1, cell 2</td>

</tr>

<tr>

<td>row 2, cell 1</td>

<td>row 2, cell 2</td>

</tr>

</table>

How the HTML code above looks in your browser:

Header 1Header 2 row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2

More Examples

Tables without borders

How to create tables without borders.

Table headers

How to create table headers.

Table with a caption

How to add a caption to a table.

Table cells that span more than one row/column

How to define table cells that span more than one row or one column.

Tags inside a table

How to display elements inside other elements.

Cell padding

How to use cellpadding to create more white space between the cell content and its borders.

Cell spacing

How to use cellspacing to increase the distance between the cells.

The frame attribute

How to use the "frame" attribute to control the borders around the table.

HTML Table Tags TagDescription <table> Defines a table <th> Defines a table header <tr> Defines a table row <td> Defines a table cell <caption> Defines a table caption <colgroup> Defines a group of columns in a table, for formatting <col /> Defines attribute values for one or more columns in a table <thead> Groups the header content in a table <tbody> Groups the body content in a table <tfoot> Groups the footer content in a table

« Previous Next Chapter »

Next Chapter »

The most common HTML lists are ordered and unordered lists:

HTML Lists An ordered list: The first list item The second list item The third list item An unordered list: List item List item List item Try-It-Yourself Examples

Naabot mo na ang dulo ng mga na-publish na parte.

⏰ Huling update: Dec 13, 2014 ⏰

Idagdag ang kuwentong ito sa iyong Library para ma-notify tungkol sa mga bagong parte!

HTML Layout - Useful Tips  CREATED BY =JAY-AR SIMON SEBASTIANTahanan ng mga kuwento. Tumuklas ngayon