--- 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.

```