Files
freeCodeCamp/curriculum/challenges/japanese/01-responsive-web-design/basic-html-and-html5/inform-with-the-paragraph-element.md
2022-01-20 20:30:18 +01:00

1.3 KiB

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
bad87fee1348bd9aedf08801 段落要素で情報を伝える 0 https://scrimba.com/p/pVMPUv/ceZ7DtN 18202 inform-with-the-paragraph-element

--description--

p 要素はウェブサイト上で文章の段落を示すのに適した要素です。 p は "paragraph" (段落) の略です。

段落の要素は以下のように作成できます。

<p>I'm a p tag!</p>

--instructions--

p 要素を h2 要素の下に作成し、段落のテキストは Hello Paragraph にしてください。

注: 慣習的に、HTMLタグは小文字で書かれます。例えば <P></P> ではなく <p></p> となります。

--hints--

正しい p 要素が必要です。

assert($('p').length > 0);

p 要素には Hello Paragraph というテキストが必要です。

assert.isTrue(/hello(\s)+paragraph/gi.test($('p').text()));

p 要素には終了タグが必要です。

assert(
  code.match(/<\/p>/g) &&
    code.match(/<\/p>/g).length === code.match(/<p/g).length
);

--seed--

--seed-contents--

<h1>Hello World</h1>
<h2>CatPhotoApp</h2>

--solutions--

<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<p>Hello Paragraph</p>