--- id: 587d781c367417b2b2512ac3 title: 設置多個標題元素的 font-weight challengeType: 0 videoUrl: 'https://scrimba.com/c/crVWRHq' forumTopicId: 301069 dashedName: set-the-font-weight-for-multiple-heading-elements --- # --description-- 在上一個挑戰裏我們已經爲每個標題設置了 `font-size`,接下來我們將要設置 `font-weight`。 `font-weight` 屬性用於設置文本中字體的粗細。 # --instructions-- # --hints-- `h1` 標籤的 `font-weight` 屬性值應爲 800。 ```js assert($('h1').css('font-weight') == '800'); ``` `h2` 標籤的 `font-weight` 屬性值應爲 600。 ```js assert($('h2').css('font-weight') == '600'); ``` `h3` 標籤的 `font-weight` 屬性值應爲 500。 ```js assert($('h3').css('font-weight') == '500'); ``` `h4` 標籤的 `font-weight` 屬性值應爲 400。 ```js assert($('h4').css('font-weight') == '400'); ``` `h5` 標籤的 `font-weight` 屬性值應爲 300。 ```js assert($('h5').css('font-weight') == '300'); ``` `h6` 標籤的 `font-weight` 屬性值應爲 200。 ```js assert($('h6').css('font-weight') == '200'); ``` # --seed-- ## --seed-contents-- ```html

This is h1 text

This is h2 text

This is h3 text

This is h4 text

This is h5 text
This is h6 text
``` # --solutions-- ```html

This is h1 text

This is h2 text

This is h3 text

This is h4 text

This is h5 text
This is h6 text
```