Suggest an editImprove this articleRefine the answer for “How do you jump to an element by ID via a link in HTML?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)To jump to an element by ID, assign it an `id` attribute (for example, `id="contact"`) and create a link `<a href="#contact">`, where `#` points to that identifier. **Key point:** on click, the browser automatically scrolls the page to the element with the matching `id`, and a smooth transition can be added with the CSS `scroll-behavior: smooth` property.Shown above the full answer for quick recall.Answer (EN)ImageTo jump to an element by **ID** via a link in HTML, you need to: 1. Assign the element a unique **identifier (**`id`**)**. 2. In the `<a>` link, specify this identifier after the `#` character in the `href` attribute. --- ### Example: ```html <a href="#section1">Go to section 1</a> <h2 id="section1">Section 1</h2> <p>This is the text of the needed section...</p> ``` When the link is clicked, the browser **scrolls the page** to the element with `id="section1"`. --- ### Navigating to an anchor on another page: ```html <a href="about.html#team">Our team</a> ``` The `about.html` page must have this element: ```html <h2 id="team">Team</h2> ``` After the click, it navigates to the `about.html` page and scrolls to the `#team` block. --- ### You can add smooth scrolling: To make the transition look smooth, add CSS: ```css html { scroll-behavior: smooth; } ``` --- ### Conclusion: To jump to an element by ID, you need to: 1. Assign the element an `id`, for example `id="contact"`. 2. Create the link `<a href="#contact">To contacts</a>`. When clicked, the browser automatically scrolls the page to the element with this ID.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.