2.2 KiB
2.2 KiB
id, challengeType, videoUrl, forumTopicId, title
id | challengeType | videoUrl | forumTopicId | title |
---|---|---|---|---|
587d778f367417b2b2512aae | 0 | https://scrimba.com/c/c437DcV | 301013 | 使用描述性链接文本赋予链接含义 |
Description
a
)之间的内容来完成这个操作。使用 "click here" 或者 "read more" 作为链接文本并没有多少帮助。相反地,应该在a
标签中使用简洁的描述性语言来为用户提供更多的信息。
Instructions
a
),将其包含的文本从 "click here" 改为 "information about batteries"。
Tests
tests:
- text: '请修改<code>a</code>标签,将其包含的文本从 "click here" 改为 "information about batteries"。'
testString: assert($('a').text().match(/^(information about batteries)$/g));
- text: '<code>a</code>元素应该有一个<code>href</code>属性,且值为空字符串'
testString: assert($('a').attr('href') === '');
- text: '<code>a</code> 元素应该有一个结束标记'
testString: assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/<a href=(''|"")>/g).length);
Challenge Seed
<body>
<header>
<h1>Deep Thoughts with Master Camper Cat</h1>
</header>
<article>
<h2>Defeating your Foe: the Red Dot is Ours!</h2>
<p>Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near. <a href="">Click here</a> for information about batteries</p>
</article>
</body>
Solution
// solution required