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:
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
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.
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:
- 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’”.
- The test says: “Each .nav-link element should have an href attribute”, which means that your
<a> elements should have the
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 )
- 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:
<br> a bit too much when you could just adjust the spacing with
padding in CSS
- neither of your
<ul> elements is closed
- you don’t need
!DOCTYPE declaration or
<body> because in CodePen’s HTML pannel you only put the things you would put inside the
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 But I hope I managed to help you with the tests at least. Good luck!
Thank you for replying and giving me some actionable tips. I will go back and read more carefully as you suggested.