---
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--
- 设置
h1
标签的 font-weight
为 800。 - 设置
h2
标签的 font-weight
为 600。 - 设置
h3
标签的 font-weight
为 500。 - 设置
h4
标签的 font-weight
为 400。 - 设置
h5
标签的 font-weight
为 300。 - 设置
h6
标签的 font-weight
为 200。
# --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
```