3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

table(表)について

Last updated at Posted at 2015-06-25

#table要素
<table> 表の始まり
</table> 表の終わり
<tr>〜</tr> 表組の見出し
<tr> 行の始まり
</tr> 表組の行の終わり
<td>〜</td> 表組のセル

HPのサンプル作成の為に以下の様に表組しました。
↓一部

HTML
<div class="company-outline">
	<h3>会社概要</h3>
	<table border="0">
		<tbody>
			<tr>
				<th>会社名</th><td>ホームページサンプル株式会社(英語表記 Homepage sample Inc.)</td>
			</tr>
			<tr>
				<th>設立</th><td>平成10年1月10日</td>
			</tr>
			<tr>
				<th>事業内容</th><td>IT・マーケティング・福祉など</td>
			</tr>
			<tr>
				<th>住所</th><td>〒012-3456見本県見本市サンプル1-2</td>
			</tr>
			<tr>
				<th>電話番号</th><td>0123-4567-89012</td>
			</tr>
			<tr>
				<th>メールアドレス</th><td>inf@example.com</td>
			</tr>
		</tbody>
	</table>
</div>
CSS
.company-outline{
	border:solid 1px #ebebeb;
	width:666px;
	height:280px;
	margin:15px 0px 0px 5px;
}
.company-outline h3{
	width:657px;
	height:30px;
	margin:0px;
	padding:7px 0px 0px 10px;
	font-weight:normal;
	font-size:15px;
	background:#eeeeee;
}
.company-outline table{
	border:solid 1px #ebebeb;
	width:600px;
	height:200px;
	margin:20px auto 0px auto;
	font-size:12px;
}
.company-outline table th{
	border-right:solid 3px #d4d4d4;
	padding-right:5px;
	font-weight:normal;
	background:#f5f5f5;
	text-align:right;
}
.company-outline table td{
	padding-left:5px;
	background:#f9f9f9;
}
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?