HTML TABLE


CODE TỔNG HỢP

Code 1 cột:
A

<div style="width:200px;height:100px;border:1px solid blue;">
HTML borders are best created with CSS.
</div>


B
<div style="width:200px;height:100px;border:2px dotted blue;">
HTML border code - or should that read CSS border code?
</div>

C
<div style="width:200px;height:100px;border:2px dashed blue;">
HTML border code - or should that read CSS border code?
</div>

D
<div style="width:200px;height:100px;border:6px outset orange;">
HTML border code - or should that read CSS border code?
</div>

Nguồn:http://www.quackit.com/html/codes/html_borders.cfm
HTML Borders from Quackit.com



Code 2 cột

Table headerTable header
Table cell 1
---------------------------------------------------
Table cell 2
-----------------------------------------------------------


<table style="background-color:lightblue;"><tbody><tr style="background-color:blue;color:white;"><th>Table header</th><th>Table header</th></tr><tr><td>Table cell 1<br>---------------------------------------------------</td><td>Table cell 2<br>-----------------------------------------------------------</td></tr></tbody></table> 


Table headerTable header
Table cell 1Table cell 2



<table style="background-color:lightblue;">
<tr style="background-color:blue;color:white;">
<th>Table header</th><th>Table header</th>
</tr>
<tr>
<td>Table cell 1</td><td style="background-color:lightgreen;">Table cell 2</td>
</tr>
</table>

oooooooooooooooo My Table Background Colors

Table headerTable header
Table cell 1Table cell 2



<html>
<head>
<title>My Table Background Colors</title>
<style type="text/css">
.myTable { background-color:#FFFFE0;border-collapse:collapse; }
.myTable th { background-color:#BDB76B;color:white; }
.myTable td, .myTable th { padding:5px;border:1px solid #BDB76B; }
</style>
</head>
<body>
<table class="myTable">
<tr>
<th>Table header</th><th>Table header</th>
</tr>
<tr>
<td>Table cell 1</td><td>Table cell 2</td>
</tr>
</table>
</body>
</html>



1  Bảng Văn bản

Ví dụ:
Bảng tiêu đềBảng tiêu đề
Bảng di động 1Bảng di động 2
Bảng di động 3Bảng di động 4

2  Bảng Borders

Ví dụ:
Bảng tiêu đềBảng tiêu đề
Bảng di động 1Bảng di động 2
Bảng di động 3Bảng di động 4

3  Bảng Màu nền

Ví dụ:
Bảng tiêu đềBảng tiêu đề
Bảng di động 1Bảng di động 2
Bảng di động 3Bảng di động 4

4  Bảng Hình ảnh nền

Ví dụ:
Bảng tiêu đềBảng tiêu đề
Bảng di động 1Bảng di động 2
Bảng di động 3Bảng di động 4
CODE 1



<html>
<head>
<title>My Table Text</title>
<style type="text/css">
.myTableText { width:600px;border-collapse:collapse;background-color:#98FB98; }
.myTableText td, .myTableText th { border:2px solid #47ae32;padding:5px; }
.myTableText th { font:bold 18px/1.1em Arial, Helvetica, sans-serif;text-shadow: 1px 1px 4px black; letter-spacing:0.2em; background-color:#47ae32; color:#98FB98; }
.myTableText td { font:normal 14px/1.5em Goudy, Georgia, serif;color:#47ae32; }
.myTableText td a { color:#006400;text-decoration:none; }
.myTableText td a:hover { color:#FF4500;text-decoration:underline; }
.myTableText td a:visited { color:#006400; }
</style>
</head>
<body>
<table class="myTableText">
<tr>
<th>Header 1</th><th>Header 2</th><th>Header 3</th>
</tr>
<tr>
<td>Table text is formatted using <a href="/css/">Cascading Style Sheets</a> (CSS). CSS provides many <a href="/css/properties/">properties</a> that allow you to format your text.</td>
<td>Table text is formatted using <a href="/css/">Cascading Style Sheets</a> (CSS). CSS provides many <a href="/css/properties/">properties</a> that allow you to format your text.</td>
<td>Table text is formatted using <a href="/css/">Cascading Style Sheets</a> (CSS). CSS provides many <a href="/css/properties/">properties</a> that allow you to format your text.</td>
</tr>
<tr>
<td>Table text is formatted using <a href="/css/">Cascading Style Sheets</a> (CSS). CSS provides many <a href="/css/properties/">properties</a> that allow you to format your text.</td>
<td>Table text is formatted using <a href="/css/">Cascading Style Sheets</a> (CSS). CSS provides many <a href="/css/properties/">properties</a> that allow you to format your text.</td>
<td>Table text is formatted using <a href="/css/">Cascading Style Sheets</a> (CSS). CSS provides many <a href="/css/properties/">properties</a> that allow you to format your text.</td>
</tr>
</table>
</body>
</html>

Table headerTable header
Table cell 1Table cell 2


<table style="border:1px solid black;">
<tr>
<th>Table header</th><th>Table header</th>
</tr>
<tr>
<td>Table cell 1</td><td>Table cell 2</td>
</tr>
</table>


Không có nhận xét nào:

Đăng nhận xét