HOME | PHP Tutorial | CSS
facebook icon
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

HTML table

The HTML table allows to arrange all data on the page like, text, images, links, forms, etc. into rows and columns of cells.
The HTML tables are created using the <table> tag, <tr> tag is used to create table rows and <td> tag is used to create data cells. The elements under <td> are regular left aligned by default.

HTML table border, HTML table style, table width

An HTML table is defined with the <table> tag where we add style with: width, border color and more .
Example 1:
<table style="width:100%; border:#C30 thin solid; text-align:center">
Note: HTML image alt attribute. The value of the alt attribute from above example 1 should describe the image what it looks like.
The html cod above will display this HTML table result:
HTML table border, HTML table style, table width, text-align:center result.
Firstname LastnameAge
Jilly Ford55
Evea Sonjak48

HTML table Colspan and Rowspan Attributes

Yf you want to merge two or more columns into a single column you will use colspan attribute. If you want to merge two or more rows you will use rowspan.
<!DOCTYPE html>
<title>HTML Table Colspan/Rowspan</title>
<table border = "1">
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<td rowspan = "2">Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
<td>Row 1 Cell 3</td>
<td>Row 2 Cell 2</td>
<td>Row 2 Cell 3</td>
<td colspan = "3">Row 3 Cell 1</td>

This HTML code will produce the following result −
Column 1 Column 2 Column 3
Row 1 Cell 1 Row 1 Cell 2 Row 1 Cell 3
Row 2 Cell 2 Row 2 Cell 3
Row 3 Cell 1

HTML Table Height and Width

You can specify table width and tabele height in pixels or percentage of available screen area.
Example 3:
<table border = "2" width = "450" height = "160">
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>

This HTML code will produce the following result −
Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2

HTML table, border, width, style, center, color, colspan, tag, rowspan, example, tag, css HTML table style, HTML border, width and height - html tutorial

3346. HTML div class tag attribute, html tutorial
HTML div class tag attribute html tutorial

2117. HTML Tutorial - Hexadecimal, RGB color codes, inserting colors into html pages / safe colors
Hexadecimal colors and rgb colors. inserting colors

2113. HTML Tutorial - Background
A web tutorial about background and background colos and images

2125. HTML Tutorial - Inserting sounds and music into HTML pages
Inserting audio strem sounds and music into html pages.

2186. HTML Tutorial - Verwendung des Div-Tag
Erstellen einer Webseite mit div-Tag. Wie man div verwendet, um einfache Layouts oder HTML-Vorlagen für Ihre Inhalte zu erstellen.

3208. HTML link tag with example, html tutorial
HTML link tag with example html tutorial

Your add here
PHP strlen() function

PHP rtrim() function

PHP str_split() function

PHP lcfirst() function

PHP html_entity_decode() function

PHP implode() function

PHP similar_text() function

PHP wordwrap() function

PHP printf() function

PHP htmlspecialchars() function

PHP isset() Function

PHP define() function

PHP str_repeat() function

PHP strip_tags() function

PHP print() function

PHP strtolower() function

PHP Data Types
PHP delete an element from an array
HTML Text Style
HTML List Bullet
Insert into SQL - Insert into table SQL - Insert data in sql
HTML div style - div style class