LoginSignup
0
0

More than 3 years have passed since last update.

HTML の 文字 の サイズ を 設定する ~CSS font-size: ピクセル数;~

Last updated at Posted at 2019-07-09

目的

  • HTMLファイルの文字のサイズを設定する方法をまとめる

押さえるポイント

  • 文字のサイズを変更したい要素をCSSで指定してサイズを設定する。
  • font-sizeプロパティを使用する。
  • ピクセル数を用いて指定する。

書き方の例(CSS)

要素の名前かクラス名{
    font-size: ピクセル数;
}

より具体的な例

〜サンプルコード〜
- 下記にHTMLファイルの内容を記載する。

<h1>おはようございます。</h1>
  • CSSで上記のHTMLファイルのh1要素の文字の大きさを30pxにする設定を行う。
  • 下記にCSSファイルの内容を記載する。
h1 {
    font-size: 30px;
}
0
0
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
0
0