Anchor Elements Question

<h2>CatPhotoApp</h2>

<main>

<a> href= "#footer."

http://freecatphotoapp.com" Jump to Bottom </a>

<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

</main>

<id= "<footer> Copyright Cat Photo App </footer>"

Where did I mess up?

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.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

Please always include the link to the challenge

Also, if you need help with the challenges you can click “Get Help” and then “Ask for help”. This will make a forum thread with your full code and some information.


The syntax for both the link and footer is incorrect. Attributes go on the opening tag of the element.

<a href="#someLink">Some link text</a>

<footer id="someLink">Some footer text</footer>
1 Like
  1. Your “href” attribute should be nested into your <a> tag like so:
<a href="#footer"> Jump to Bottom </a>
  1. Make sure your href value is spelled correctly. You had a " . " after #footer

  2. The opening footer tag at the bottom is messed up. It should be formatted like so:

<footer id="footer"> Copyright Cat Photo App </footer>

Generally, elements are made up of 3 parts; the opening tag, the content, and the closing tag in that order. Within the opening tag is where you'll define the id or attributes . For example, if we wanted to add the href attribute to our anchor element we must add it to our opening tag as shown in point number 1.

Hopefully this is able to help you out. I’m still relatively new to this myself so if anyone reading this finds any mistakes please let me know!