LoginSignup
0
0

More than 1 year has passed since last update.

Font-weightについて

Posted at

・Progate環境の話になります ・まだまだ知識が浅いので拙い話だったり、間違っている点もあると思います

最近ProgateでHTMLの学習をしています。
<h2><h3>タグの太字をなくそうと思ったところ、できるときとできない時があったので不思議に思いながらまとめてみました。
htmlは下記のコードです。

top.html
 <div class="contents-copy">
   <h2>さぁ、あなたもProgateでプログラミングを学んでみませんか?</h2>
   <h3>Let's learn to code, learn to be creative!</h3>
 </div>

できなかったコード

stylesheet.css
 .contents-copy {
     font-weight:normal;
     color:#5f5d60;
  }

できたコード

stylesheet.css
 .contents-copy {
     color:#5f5d60;
  }

 .contents-copy h2 {
     font-weight:normal;
  }

 .contents-copy h3 {
     font-weight:normal;
  }

考察

colorはまとめて指定できるけど、font-weightはできない?

font-weightは親要素の<div>でまとめて指定はできないのでしょうか。
ちなみにcolor<div>でも<h2>,<h3>に個別に指定してもどちらでもという感じでした。
ググったのですが、答えは得られず……:sweat_drops:どなたかご教授いただければ幸いです!

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