Recall & Review
beginner
What is the purpose of using an ID attribute in HTML?
An ID attribute gives a unique name to an element on the page. It helps to link directly to that element or style it uniquely.
Click to reveal answer
beginner
How do you create a link that jumps to a specific section on the same page?
Use an anchor tag with href set to '#' followed by the section's ID. For example,
<a href="#section1">Go to Section 1</a>.Click to reveal answer
beginner
What happens when you click a link with href="#someID"?
The browser scrolls or jumps instantly to the element with the matching ID 'someID' on the page.
Click to reveal answer
beginner
Can multiple elements have the same ID on a page? Why or why not?
No, IDs must be unique on a page. If multiple elements share the same ID, linking and styling can break or behave unpredictably.
Click to reveal answer
beginner
How do you assign an ID to a section element in HTML?
Add the ID attribute inside the opening tag. For example:
<section id="about">...</section>.Click to reveal answer
Which attribute do you use to link to a section with ID 'contact' on the same page?
✗ Incorrect
To link to a section on the same page, use href="#ID" where ID is the target element's ID.
What must be true about IDs used for linking in HTML?
✗ Incorrect
IDs must be unique so the browser knows exactly where to jump when a link is clicked.
What tag is used to create a clickable link in HTML?
✗ Incorrect
If you want to link to a section with , what is the correct link?
✗ Incorrect
Use href="#features" to link to the section with ID 'features'.
What is the visual effect when clicking a link to an ID on the same page?
✗ Incorrect
Clicking the link scrolls or jumps the page to the element with the matching ID.
Explain how to create a link that jumps to a specific section on the same page using IDs.
Think about how you name the section and how the link refers to that name.
You got /5 concepts.
Why is it important that IDs are unique when linking to sections in HTML?
What happens if two sections have the same ID?
You got /5 concepts.