Closed sykulmikes closed 4 years ago
Hello there,
In general, I suggest you open an issue like this on the forum. It would help, if you linked to your project, wherever it is hosted.
From what I assume, the tests would fail, because you are telling them to look for an element with an id="pricing"
, yet none exists. I cannot speak for why only that element brings up the error. Likely, you are experiencing buggy behaviour, because, from what I know, the a
tag does not support the name
attribute. The only resource I found with this system of linking is here, and it does not appear to be a reliable resource.
Essentially, I am going to close this issue, as the code does not contain best-practices, nor normal-practices. I welcome you to re-open this, with evidence the tests should be altered.
Thank you.
Hello Shaun,
As per my issue, the element does exist and I have no problem linking to it when I test, so not sure why you / the code you're executing can't find it? How are you parsing the code. I have written plenty of parsers in my time and am sure it would be easy enough to find. Please see extract below:
As stated in my issue when I click on the link it takes me to the place on the web page where the reference is regardless of which link I click. My issue is why can't your parser see it. The link is there so there is either something wrong with the way I've coded it or there is something wrong with your parser that it is unable to identify it.
I would appreciate you looking into it, as it looks to me as though it does exist and I'm unsure why you couldn't find it if you cast your eye over the code?
many thanks, Mike
On Sat, 13 Jun 2020 at 13:15, Shaun Hamilton notifications@github.com wrote:
Hello there,
In general, I suggest you open an issue like this on the forum https://www.freecodecamp.org/forum. It would help, if you linked to your project, wherever it is hosted.
From what I assume, the tests would fail, because you are telling them to look for an element with an id="pricing", yet none exists. I cannot speak for why only that element brings up the error. Likely, you are experiencing buggy behaviour, because, from what I know, the a tag does not support the name attribute. The only resource I found with this system of linking is here http://www.tagindex.net/html/link/a_name.html, and it does not appear to be a reliable resource.
Essentially, I am going to close this issue, as the code does not contain best-practices, nor normal-practices. I welcome you to re-open this, with evidence the tests should be altered.
Thank you.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/testable-projects-fcc/issues/1166#issuecomment-643615392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO75BYIYNY6SAHC52I4HAHTRWNUWHANCNFSM4N44YPQQ .
The link is there so there is either something wrong with the way I've coded it or there is something wrong with your parser that it is unable to identify it.
You are absolutely correct. I did not deny the functionality. What I said is that linking an anchor to another anchor via a name
attribute is not best-practice or even good-practice. Therefore, I do not believe the tests should consider this.
The tests expect the anchor link to take the page to an element with a corresponding id
. Best-practice is:
<ul>
<li><a href="#contacts">Click to go to Contacts</a></li>
</ul>
...
<section id="contacts">...</section>
Hi Shaun,
Thanks for your feedback. I appreciate that you have taken the time and trouble to respond.
Although I'm an experienced coder in other languages, I'm learning HTML / CSS / Javascript and am eager to adopt best practice. Is there a guide I could read that would point me in the right direction, or act as a point of reference, as I followed the advice I found through Google, which you state is not good practice?
Many thanks, Mike
On Sat, 13 Jun 2020 at 20:09, Shaun Hamilton notifications@github.com wrote:
The link is there so there is either something wrong with the way I've coded it or there is something wrong with your parser that it is unable to identify it.
You are absolutely correct. I did not deny the functionality. What I said is that linking an anchor to another anchor via a name attribute is not best-practice or even good-practice. Therefore, I do not believe the tests should consider this.
The tests expect the anchor link to take the page to an element with a corresponding id. Best-practice is:
...
... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/testable-projects-fcc/issues/1166#issuecomment-643665136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO75BYNT4OUXNZIFSZFIDC3RWPFFBANCNFSM4N44YPQQ .
We are happy for campers to ask questions.
For HTML, CSS, and JavaScript, your first point of call will likely be: Mozilla Docs, or W3SCHOOLS. They are considered the official docs.
Other than that, freeCodeCamp does teach some of the best-practices. The only issue is that the lessons were purposely made very short, thus do not go over everything. This is why fCC's mantra is Read-Search-Ask.
Do not forget about the freeCodeCamp forum. It is full of experienced web devs.
Hope this helps
Issue Description
Running Tests for "Build a Product Landing Page". Results achieved 15/16 tests were successful. The test that failed stated:
There are 3 Nav links and they all work fine when I test them. Your testing only highlights the 3rd link as failing. All 3 links use the same HTML coding solution.
Browser Information
Your Code / Link to Your Pen
Screenshot