--- id: 587d781b367417b2b2512abb title: 使用 hr 标签创建水平线 challengeType: 0 videoUrl: 'https://scrimba.com/c/c3bR8t7' forumTopicId: 301049 dashedName: create-a-horizontal-line-using-the-hr-element --- # --description-- 你可以用 `hr` 标签来创建一条宽度撑满父元素的水平线。 这种水平分割线一般用来表示内容主题的改变,或在视觉上将文档分隔成几个部分。 # --instructions-- 在卡片标题元素 `h4` 下方添加一个 `hr` 标签。 **注意:** HTML 中的 `hr` 是自闭合标签,所以我们不需要为它添加结束标签。 # --hints-- 应存在一个 `hr` 标签。 ```js assert($('hr').length == 1); ``` `hr` 应在标题和段落之间。 ```js assert(code.match(/<\/h4>\s*?|\s*?\/>)\s*?

/gi)); ``` # --seed-- ## --seed-contents-- ```html

GoogleAlphabet

Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

``` # --solutions-- ```html

GoogleAlphabet


Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

```