From 33edc072b9fe11e4a9d1a370b009d5fbd580f46b Mon Sep 17 00:00:00 2001 From: Jean Jordaan Date: Mon, 25 Mar 2019 22:50:33 +0700 Subject: [PATCH] Use the correct element name in blocks, gloss it seperately (#35616) * Update link-to-external-pages-with-anchor-elements.english.md If you write "`anchor` element" instead of "`a` element", you should also write "`hyperreference` attribute", instead of "`href` attribute". Suggestion: write "`a` (_anchor_) element", or "anchor (`a`) element", to communicate the element name explicitly and gloss it at the same time. The `` sections should be valid code as far as possible. * Change md to html * Don't mark up 'anchor' as code The tag is `a`, the name is _anchor_. * Revert "Don't mark up 'anchor' as code" This reverts commit 50c6a3a7c9697f889489bd586ceccd617cc4af1c. * Don't mark up 'anchor' as code The tag is `a`, the name is _anchor_. --- .../link-to-external-pages-with-anchor-elements.english.md | 4 ++-- ...nternal-sections-of-a-page-with-anchor-elements.english.md | 2 +- .../nest-an-anchor-element-within-a-paragraph.english.md | 4 ++-- .../basic-html-and-html5/turn-an-image-into-a-link.english.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.english.md index a5b681222e..f3a9c7860c 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.english.md @@ -7,8 +7,8 @@ videoUrl: 'https://scrimba.com/p/pVMPUv/c8EkncB' ## Description
-You can use anchor elements to link to content outside of your web page. -anchor elements need a destination web address called an href attribute. They also need anchor text. Here's an example: +You can use a (anchor) elements to link to content outside of your web page. +a elements need a destination web address called an href attribute. They also need anchor text. Here's an example: <a href="https://freecodecamp.org">this links to freecodecamp.org</a> Then your browser will display the text "this links to freecodecamp.org" as a link you can click. And that link will take you to the web address https://www.freecodecamp.org.
diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements.english.md index 63a4b8dc15..f4e3644bc6 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements.english.md @@ -7,7 +7,7 @@ videoUrl: 'https://scrimba.com/p/pVMPUv/cyrDRUL' ## Description
-anchor elements can also be used to create internal links to jump to different sections within a webpage. +a (anchor) elements can also be used to create internal links to jump to different sections within a webpage. To create an internal link, you assign a link's href attribute to a hash symbol # plus the value of the id attribute for the element that you want to internally link to, usually further down the page. You then need to add the same id attribute to the element you are linking to. An id is an attribute that uniquely describes an element. Below is an example of an internal anchor link and its target element:
<a href="#contacts-header">Contacts</a>
...
<h2 id="contacts-header">Contacts</h2>
diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.english.md index b062f85747..3253249aab 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.english.md @@ -11,10 +11,10 @@ You can nest links within other text elements.
<p>
Here's a <a target="_blank" href="http://freecodecamp.org"> link to freecodecamp.org</a> for you to follow.
</p>
Let's break down the example: Normal text is wrapped in the p element:
<p> Here's a ... for you to follow. </p> -Next is the anchor element <a> (which requires a closing tag </a>):
<a> ... </a> +Next is the anchor element <a> (which requires a closing tag </a>):
<a> ... </a> target is an anchor tag attribute that specifies where to open the link and the value "_blank" specifies to open the link in a new tab href is an anchor tag attribute that contains the URL address of the link:
<a href="http://freecodecamp.org"> ... </a> -The text, "link to freecodecamp.org", within the anchor element called anchor text, will display a link to click:
<a href=" ... ">link to freecodecamp.org</a> +The text, "link to freecodecamp.org", within the a element called anchor text, will display a link to click:
<a href=" ... ">link to freecodecamp.org</a> The final output of the example will look like this:

Here's a link to freecodecamp.org for you to follow.

diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.english.md index 34a67e4607..072c663736 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.english.md @@ -15,7 +15,7 @@ Remember to use # as your a element's href -Place the existing image element within an anchor element. +Place the existing image element within an a (anchor) element. Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link.