Step 13 where to add the _blank

The instructions state to " Add a target attribute with the value _blank to the anchor (a ) element’s opening tag, so that the link opens in a new tab." however, where to add the _blank value is unclear. I’m not sure where to add this in… adding it to the “anchor element’s opening tag” leads me to think rightaround the <a href but every place I’ve tried is incorrect
**My code so far:

    <p>Click here to view more <a_blank href="https://freecatphotoapp.com">cat photos</a>.</p>

Challenge: Step 13

Link to the challenge:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

This isn’t how you add an attribute to an anchor element.

sooo how do I add an attribute?

sooo how did you add attributes here:

Same idea in this challenge, just a different attribute-value pair.

I’m not trying to be sarcastic, I’m just trying to understand where to add the _blank. Rather than comment what I’m not doing in a post that’s seeking information, would you mind providing me with the information that I’m seeking? Step 8 is not helpful for me, I’m just not understanding where to put this

We don’t write the answer for you - that’s against the rules.

An example of an img element using an src attribute: <img src="https://www.your-image-source.com/your-image.jpg">.

This is an example of a src attribute inside of an img element.

You need to do the exact same thing, but with a target attribute inside of the a element. That target attribute needs the value of _blank.

image

image
no matter where I place the _blank it’s wrong

That is a _blank attribute with no value. You need a target attribute set equal to _blank.

Please post code instead of pictures. I can’t run a picture and its harder to read. Thanks

how do I do that? this is really not beginner friendly

Are you saying that I need to add a line and set the target attribute to _blank, but within the anchor?

This img element has a src attribute set equal to the value of "https://www.your-image-source.com/your-image.jpg". You do literally the exact same thing, but you need to use a target attribute and set it equal to _blank.

Or, if you want a different example, its like how you set the href attribute here:

href="https://freecatphotoapp.com"

myAttribute="someValue" is the syntax you’ve been using - now you need to use the same syntax with a different attribute, the target attribute.

1 Like

I’m hoping this is close
<target _blank="https://freecatphotoapp.com"> <p>Click here to view more <a href="https://freecatphotoapp.com">cat photos</a>.</p>

No. You deleted the a, created a _blank attribute again, and removed the href attribute.

Here is the original code:

      <p>Click here to view more <a href="https://freecatphotoapp.com">cat photos</a>.</p>

Don’t delete anything. You should not remove any functionality you already created. You are only adding one attribute value pair.

Specifically, you need to add the target attribute to the opening a tag and set that attribute equal to the value of _blank.

Every single opening tag has the same basic structure:

<tagname firstattribute="value1" secondattribute="value2" thirdattribute="value3">

Take the original code and add a single attribute-value pair, taget with the value of _blank.

@cgall219
It might help to revisit how HTML tags are structured, especially around nomenclature.

HTML <tags> have things called attributes attached to them, you can think of them like options or additional information relating to the tag it is attached to.

E.g. <img> is a type of HTML tag, we can call it an img tag: img HTML tags have an attribute called src attached to them. The img tag with the src attribute attached to it would look like this: <img src>. - technically, the img tag now has an empty src attribute. To make this valid HTML markup, we would need to change the attribute’s value to look something like this <img src="picture_name.jpg">. Does this clear up your confusion?

Thanks man. I was stuck too. Thank to you I got it now :smiley:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.