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
div
element with a correspondingid="img-div"
.
User Story #4: Within the
img-div
element, I should see animg
element with a correspondingid="image"
.
User Story #5: Within the
img-div
element, I should see an element with a correspondingid="img-caption"
that contains textual content describing the image shown inimg-div
.
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
a
element with a correspondingid="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 oftarget
and set it to_blank
in order for your link to open in a new tab (i.e.target="_blank"
).
The instructions are explicit and correct - you must use these id
s.
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.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.