Webの森.com


黒色がソースファイル/赤色が書き出した文字

<head>
<title>スタイルシート - <head>タグに記述する方法 サンプル1
<style type="text/css">
<!--

body {
   background-color: #cceeff;
}

font {
   font-size: 20px;
   color: #ff0000;
}

.test_class {
   font-size: 30px;
   color: #ff0000;
}

#test_id {
   font-size: 40px;
   color: #ff0000;
}

-->
</style>
</head>


<head>内でスタイル設定されてまーす
<font>
   <head>内でスタイル設定されてまーす
</font>

優先順位が高い方がスタイル優先されまーす
<font style="font-size: 15px; color: #ff0000; font-weight: bold;">
   優先順位が高い方がスタイル優先されまーす
</font>

クラスで指定してまーす
<div class="test_class">
   クラスで指定してまーす
</div>

IDで指定してまーす
<div id="test_id">
   IDで指定してまーす
</div>