Is it compulsory to give same id and same class name while completing project. or i can give my own name ?
Hi @rio7 !
I am not sure I understand your question.
Can you provide an example of what you are asking?
Some ids and class names may be required. If they are explicitly required by the instructions then the tests will fail if you use something else.
i am completing my certification project of responsive web design and i want to use my own id and class name to different section of my project. so my question was , is it compulsory to use same id and class name provided in sample of freecodecamp.
you should not copy the freeCodeCamp sample
it is compulsory to use theclasses and ids required by user stories, as if you don’t you fail the tests, anything else is at your discretion
The test suite needs some way of identifying parts of your code. If the test suite has certain requirements, you must meet those requirements to claim the certificate.
Looking at the first project for example:
User Story #1: My tribute page should have an element with a corresponding
id="main", which contains all other elements.
User Story #2: I should see an element with a corresponding
id="title", which contains a string (i.e. text) that describes the subject of the tribute page (e.g. “Dr. Norman Borlaug”).
User Story #3: I should see a
divelement with a corresponding
User Story #4: Within the
img-divelement, I should see an
imgelement with a corresponding
User Story #5: Within the
img-divelement, I should see an element with a corresponding
id="img-caption"that contains textual content describing the image shown in
User Story #6: I should see an element with a corresponding
id="tribute-info", which contains textual content describing the subject of the tribute page.
User Story #7: I should see an
aelement with a corresponding
id="tribute-link", which links to an outside site that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of
targetand set it to
_blankin order for your link to open in a new tab (i.e.
The instructions are explicit and correct - you must use these
As the others have mentioned, you have to use the ids required for the user stories.
Once you pass the tests, then any extra elements you add to the page you can use your own class names.
Hope that clarifies it for you.