freeCodeCamp/curriculum/challenges/japanese/01-responsive-web-design/basic-html-and-html5/uncomment-html.md

1.7 KiB

id title challengeType videoUrl forumTopicId dashedName
bad87fee1348bd9aedf08802 HTML のコメントを解除する 0 https://scrimba.com/p/pVMPUv/cBmG9T7 18329 uncomment-html

--description--

コメントは、エンドユーザーに表示される最終的な出力に影響を与えることなく、コード内に他の開発者へのコメントを残す方法です。

また、コメントはコードを完全に削除せずに無効化するための便利な方法でもあります。

HTML のコメントは <!-- で始まり、--> で終わります。

--instructions--

h1, h2p 要素のコメントを解除してください。

--hints--

コメントを解除すると h1 要素はページに表示されるはずです。

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

コメントを解除すると h2 要素はページに表示されるはずです。

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

コメントを解除すると p 要素はページに表示されるはずです。

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

コメントタグの末尾がページに表示されてはいけません (例: -->) 。

assert(!$('*:contains("-->")')[1]);

--seed--

--seed-contents--

<!--
<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
-->

--solutions--

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>