Newbie issues regarding anchors

Newbie issues regarding anchors
0.0 0

#1
<h2>CatPhotoApp</h2>
<main>
 
  *<a href="#footer">Jump to Bottom</a>
  
  <img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
  
  <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. Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. 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>
  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
  <p>Meowwww loved it, hated it, loved it, hated it yet spill litter box, scratch at owner, destroy all furniture, especially couch or lay on arms while you're using the keyboard. Missing until dinner time toy mouse squeak roll over. With tail in the air lounge in doorway. Man running from cops stops to pet cats, goes to jail.</p>
  <p>Intently stare at the same spot poop in the plant pot but kitten is playing with dead mouse. Get video posted to internet for chasing red dot leave fur on owners clothes meow to be let out and mesmerizing birds leave fur on owners clothes or favor packaging over toy so purr for no reason. Meow to be let out play time intently sniff hand run outside as soon as door open yet destroy couch.</p>
  
</main>
 
<footer>Copyright Cat Photo App</footer>

*noted areas are my issue. directions say:
Change your external link to an internal link by changing the href attribute to “#footer” and the text from “cat photos” to “Jump to Bottom”.

Remove the target="_blank" attribute from the anchor tag since this causes the linked document to open in a new window tab.

Then add an id attribute with a value of “footer” to the element at the bottom of the page.


#2

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#3

You have taken care of 2 out of 3 of the items on the instructions. The only thing you need to do now is add an id attribute to the footer element.

Also, I formatted your code with 3 backticks to make it more readable. Please don’t keep changing it back.


#4

Sorry, I did not realize you changed it. Adding the id attribute to the footer element is my issue, I do not know what that looks like.


#5

You don’t know what an element looks like? a footer element looks like? or an id attribute looks like?


#6

When adding id to an element, the syntax goes:

<element something = "something" id = "whatever-id-you-want" something-else = "something-else">
</element>

#7
<a href="#contacts-header">Contacts</a>
...
<h2 id="contacts-header">Contacts</h2>
*The example given; however, when i use this format it says there should only be one footer tag.
This is what I came up with:
<a href="#footer">Jump to Bottom</a>
<h2 id="footer">Copyright Cat Photo App</footer></h2>

#8

I can not see the rest of your modified code, because you did not share it, but the above line is a problem. Not sure why you changed the opening tag for the footer element to an opening tag for an h2 element. You need to change the h2 back to footer and get rid of that </h2>.


#9
There is no other code needed, I hope. These are the only two lines that were asked to be changed. 
leaving it like:
<footer>Copyright Cat Photo App<footer> 
This outcome says,'The footer tag should have an id attribute set to "footer".'

#10

You have two opening tags above. One needs to be a closing tag. Also, you still have not added an id attribute and set it equal to “footer”. Elements can have multiple attributes. Examples include class, id, name, etc. The syntax for adding an attribute and assigning it a value looks like:

<elementName attributeName="attributeValue"></element>

The above element called elementName has an attribute called attributeName with a value of “attributeValue”. See if you can add an id attribute of “footer” to your corrected footer element above.


#11

I appreciate the effort, I am stupid. I will need to read up on this. I have looked for a suggestion box and failed. I think the first few lesson should have a hidden answer box, so that it will help with the actual insertions i.e. element name, attributename, etc. This is my first hour of coding lol. Thanks alot.


#12

Don’t feel stupid. You probably just need to take a step back or take a break and come back to the lessons. Maybe go back a few to familiarize yourself with what you have learned already.


#13

I will definitely do that, thanks!


#14
<footer id=footer>Copyright Cat Photo App</footer>
I had to just plug and play guess the answer. 
The example:
<a href="#contacts-header">Contacts</a>
...
<h2 id="contacts-header">Contacts</h2>

*<h2 id="contacts-header">Contacts</h2> 
  vs
*<footer id=footer>Copyright Cat Photo App</footer>
*this part gave me the issue, as the directions plus this example further complicated. This is because the direction did not say to keep the elementname(footer) then add the attributenamme(id). the rest was explained well. Though it could just be me. 

#15

You have two of the same line. Get rid of the top one and make sure to surround the id attribute’s value with " ".

Also, when posting code to the forum, please use the instructions I gave you in my first reply regarding using 3 backticks on the line before and after the code. That way, you don’t have to put * …