fix: example link will open in new tab (#22)
Example link will open in new tab Final editing
This commit is contained in:
committed by
mrugesh mohapatra
parent
999c6af639
commit
5815401097
@ -1043,13 +1043,14 @@
|
||||
"title": "Nest an Anchor Element within a Paragraph",
|
||||
"description": [
|
||||
"You can nest links within other text elements.",
|
||||
"<blockquote><p><br> Here's a <a href=\"http://freecodecamp.org\"> link to freecodecamp.org</a> for you to follow.<br></p></blockquote>",
|
||||
"<blockquote><p><br> Here's a <a target=\"_blank\" href=\"http://freecodecamp.org\"> link to freecodecamp.org</a> for you to follow.<br></p></blockquote>",
|
||||
"Let's break down the example:",
|
||||
"Normal text is wrapped in the <code>p</code> element:<br> <code><p> Here's a ... for you to follow. </p></code>",
|
||||
"Next is the <code>anchor</code> element <code><a></code> (which requires a closing tag <code></a></code>):<br> <code><a> ... </a></code>",
|
||||
"<code>target</code> is an anchor tag attribute that specifies where to open the link and the value <code>\"_blank\"</code> specifies to open the link in a new tab",
|
||||
"<code>href</code> is an anchor tag attribute that contains the URL address of the link:<br> <code><a href=\"http://freecodecamp.org\"> ... </a></code>",
|
||||
"The text, <strong>\"link to freecodecamp.org\"</strong>, within the anchor element called <code>anchor text</code>, will display a link to click:<br> <code><a href=\" ... \">link to freecodecamp.org</a></code>",
|
||||
"The final output of the example will look like this:<br><p>Here's a <a href=\"http://freecodecamp.org\"> link to freecodecamp.org</a> for you to follow.</p>",
|
||||
"The final output of the example will look like this:<br><p>Here's a <a target=\"_blank\" href=\"http://freecodecamp.org\"> link to freecodecamp.org</a> for you to follow.</p>",
|
||||
"<hr>",
|
||||
"Now nest your existing <code>a</code> element within a new <code>p</code> element (just after the existing <code>main</code> element). The new paragraph should have text that says \"View more cat photos\", where \"cat photos\" is a link, and the rest of the text is plain text."
|
||||
],
|
||||
|
Reference in New Issue
Block a user