Junior
What is an anchor in the context of web development?
sobes.tech AI
Answer from AI
In web development, an anchor is an element that allows creating a link to a specific place on the page. Usually, this is an HTML <a> tag with an href attribute pointing to an identifier within the page.
Example:
<a href="#section1">Go to Section 1</a>
...
<h2 id="section1">Section 1</h2>
When clicked, the browser will scroll to the element with id="section1". This is useful for navigation within long pages or creating a table of contents.