【CSS05】CSS課題:文字の修飾

<?xml version="1.0" encording="Shift-JIS"?>
<!DOCTYPE html PUBLIC"-//W3C/DTD/XHTML 1.0 Trandisional//EN""http://www.w3.org/TR/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang:"ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift-JIS" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>【CSS05】CSS課題:文字の修飾</title>
<style type="text/css">

h2 {
	color: #fff;
	font-size: 1.0em;
	background-color: #1565b5;
	margin: 0;
	padding: 1em;
	}
p {
	background-color: #bdd4eb;
	font-size: 0.75em;
	margin: 0;
	padding: 1em;
	}

</style>

</head>
<body>
<h2>background-colorの設定</h2>
<p>見出しには濃いめの色を背景に指定し、文字を白抜きにします。段落には見出しよりも薄い色を指定します。さらに見出しと段落の上下のマージンを0にして、ボックスの上下をくっつけ、パディングを1em指定します。</p>
</body>
</html>