代表者の戯言

文字の大きさを指定したい



htmlにて文章を書いている間に、文字の大きさを指定したい、と思う場合がある。まあ基本中の基本であるが、cssを利用して下記のとおりに指定したい


HTML側

link rel="stylesheet" href="style.css"



例(文字の大きさを変更したい箇所にこちらを挿入する)


(h1)H1の大きさです(/h1)


(h2)H2の大きさです(/h2)


(h3)H1の大きさです(/h3)


実際のプログラムでは【(】を【<】に、【)】を【>】に変更してください。



style.css側


/* h1について******************************************* */

h1 {

font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;

font-size: 38px;

margin-top: 0;

margin-bottom: 0}


/* h2について******************************************* */

h2 {

font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;

font-size: 18px;

margin-top: 0;

margin-bottom: 0}


/* h3について******************************************* */

h3 {

font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;

font-size: 17px;

margin-top: 0;

margin-bottom: 0;

color: #000000}