Landing Page project Test Suite

Hello everyone,

I am having a few issues with my landing page and have spent more time than I’d like to admit tring to fine tune it. Here is what I am having issues with:

  1. I failed the test for having the email address in my form be mandatory to submit it even though I have used the required attribute for the email form

  2. The test says that I have failed to make my links navigate to the proper places on my landing page even though the links seem to be working fine.

  3. It also says that my form is not being submitted to a static page even though I have used the recommended page given in the directions with an action attribute.

If anyone can shed some light as to why this is happening, it would be much appreciated.

Hi! You need to read the instructions in the failed tests a bit more carefully. Here’s what I mean:

  1. The problem isn’t in the required attribute, it’s something else. This is what the test says: “The #email input element should use HTML5 validation : expected ‘text’ to equal ‘email’”.
  2. The test says: “Each .nav-link element should have an href attribute”, which means that your <a> elements should have the class of nav-link because they’re the ones with an href attribute, not <li>. (By the way, once you try to fix this, you might also fail test number 4, so again, read that one carefully too :slight_smile: )
  3. Again, the issue isn’t about the action attribute, it’s about the type of element that you used. Test 11 says: “#submit should be an element : expected ‘BUTTON’ to equal ‘INPUT’”. Once you fix this, test 12 should be automatically fixed as well.

You have some other issues too, like:

  • using <br> a bit too much when you could just adjust the spacing with margin or padding in CSS
  • neither of your <ul> elements is closed
  • you don’t need !DOCTYPE declaration or <html> and <body> because in CodePen’s HTML pannel you only put the things you would put inside the body
  • putting value in name and email fields basically fills them with text, so if a user wants to enter their own info, they have to first delete your values, which might not be the optimal user experience

I haven’t had a chance to look at your code in more detail, so I’d suggest that you do this :slight_smile: But I hope I managed to help you with the tests at least. Good luck! :smiley:

Thank you for replying and giving me some actionable tips. I will go back and read more carefully as you suggested.

1 Like