スタイルシートで見出しをデザインする
4.スタイルシートで作る見出しへようこそ
4.のCSSとhtml
sample css ↓
.title4 {
border-top: 3px solid #336666;
text-align: left;
background-color: #eee;
font-size: 14px;
color: #000;
margin:0px;
padding: 2px 2px 2px 15px;
width:400px;
}
h1タグにクラス指定 ↓
<h1 class="title4">ここへ文字</h1>
<p>タグで記述する場合、スタイルシートに font-weight: bold; を追加すると太字になります。
<p>タグにクラス指定 ↓
<p class="title4">ここへ文字</p>